refactor(db): de-duplicate the SQLite version check and _run_schema rollback #262
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#262
Loading…
Reference in a new issue
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?
P3 follow-up from PR #234 review pass 2 (both axes).
Finding
app/db/database.py:593-596checks the SQLite version twice:sqlite_version_info < (3, 35), then again by parsingsqlite_version. Either one is enough.app/db/database.py:922-934has the same try/rollback/raise block in both branches.Acceptance Criteria
sqlite_version_infocheck, and update the test that patches both._run_schemaonce on the resolved connection, or move the rollback inside it.