SQLite's executescript() auto-commits each DDL statement individually. If a migration crashes mid-run, prior ALTER TABLE statements are already committed but the migration is never recorded as applied. On restart, the runner re-runs the same file and hits 'duplicate column name' on already-applied statements, breaking subsequent startups permanently. Replace executescript() with per-statement execute() calls. 'Duplicate column name' OperationalErrors are caught and logged as warnings so the migration can complete and be marked as done. All other errors still propagate normally. |
||
|---|---|---|
| .. | ||
| affiliates | ||
| api | ||
| config | ||
| db | ||
| documents | ||
| hardware | ||
| llm | ||
| manage | ||
| pipeline | ||
| preferences | ||
| tasks | ||
| tiers | ||
| vision | ||
| wizard | ||
| __init__.py | ||