You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug: Database Conflict When PraisonAI Detects Supabase/Postgres in Production Environments
Description:
Issue:
When using PraisonAI in environments where a .env file includes credentials for Supabase or PostgreSQL (e.g., production setups), PraisonAI prioritizes these databases over SQLite. This behavior causes schema conflicts, particularly with the users table, as PraisonAI expects a different schema than most production applications.
Impact:
Data Integrity Risks: Production databases may be unintentionally modified.
Tool Inaccessibility: The tool cannot be used without modifying .env or isolating it in a separate environment.
Data Safety This is a necessary feature for data security and safety during production.
Separation of concerns keep the real db safe, while working with the praisonAi [code] tool.
Steps to Reproduce:
Configure a .env file with Supabase or PostgreSQL connection strings.
Run PraisonAI in a project where the database schema conflicts with the tool (e.g., a production app with different users table requirements).
Observe schema conflicts and resulting errors.
Suggested Solution:
A feature was added in [Pull Request #<PR_NUMBER>](<PR_LINK>) to introduce a FORCE_SQLITE toggle. This toggle bypasses Supabase/Postgres detection and forces the tool to use SQLite, ensuring isolation from production databases.
Workaround:
Before this feature is merged, users can manually:
Patch the db.py file to skip Supabase/Postgres detection and enforce SQLite usage.
Use the patch provided in the codePatches directory of the pull request.
Consider merging the feature in Pull Request: #334 and adding documentation for users who might encounter similar issues.
Let me know if there are any additional adjustments you'd like me to make! It is my opinion that this would be well suited for a centralized config file where the user can select whichever database they want used instead of having auto-detect, or in addition to having autodetect.
The text was updated successfully, but these errors were encountered:
Title:
Bug: Database Conflict When
PraisonAI
Detects Supabase/Postgres in Production EnvironmentsDescription:
Issue:
When using
PraisonAI
in environments where a.env
file includes credentials for Supabase or PostgreSQL (e.g., production setups),PraisonAI
prioritizes these databases over SQLite. This behavior causes schema conflicts, particularly with theusers
table, asPraisonAI
expects a different schema than most production applications.Impact:
.env
or isolating it in a separate environment.Steps to Reproduce:
.env
file with Supabase or PostgreSQL connection strings.PraisonAI
in a project where the database schema conflicts with the tool (e.g., a production app with differentusers
table requirements).Suggested Solution:
A feature was added in [Pull Request #<PR_NUMBER>](<PR_LINK>) to introduce a
FORCE_SQLITE
toggle. This toggle bypasses Supabase/Postgres detection and forces the tool to use SQLite, ensuring isolation from production databases.Workaround:
Before this feature is merged, users can manually:
db.py
file to skip Supabase/Postgres detection and enforce SQLite usage.codePatches
directory of the pull request.Linked Resources:
Request for Maintainers:
Consider merging the feature in Pull Request: #334 and adding documentation for users who might encounter similar issues.
Let me know if there are any additional adjustments you'd like me to make! It is my opinion that this would be well suited for a centralized config file where the user can select whichever database they want used instead of having auto-detect, or in addition to having autodetect.
The text was updated successfully, but these errors were encountered: