Remove SQLite fallback code from db_engine.py #70
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#70
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The database initialization in
app/db_engine.py(lines 14-39) still contains a full SQLite fallback path withDATABASE_TYPEdefaulting to'sqlite'. The project policy is "PostgreSQL only (no SQLite fallback)."If
DATABASE_TYPEis ever unset, the application silently tries to connect to a SQLite file that doesn't exist in production, causing startup failure with misleading errors.Fix
Remove the SQLite branch entirely. Default to PostgreSQL and raise a clear error if connection parameters are missing.
Severity
High — risk of silent misconnection and confusing errors.
PR #89 opens the fix: #89
Removed the
DATABASE_TYPEconditional and SQLite fallback entirely.PooledPostgresqlDatabaseis now initialized unconditionally at module level. Added aRuntimeErrorat startup ifPOSTGRES_PASSWORDis unset, which also removes the hardcoded'sba_dev_password_2024'fallback. Note: PR #84 addresses the same password removal — whichever merges second will need a trivial rebase.