Add uploads table migration#245
Conversation
|
Reviewer note: this migration is only for existing databases. Fresh databases already get |
|
This PR adds a migration for a change that was implemented -- but not yet merged -- before migration mechanism existed. True, the PR that introduced If I implemented migrations from the start (which I should have!) they would include creation of database and dozens of changes. At this point, retracing the entire history would make no sense. Another, more important reason for rejecting this PR is that the migration is incorrect: the table needs to be populated with data extracted from table |
Summary
Add a migration that creates the
uploadstable for existing databases.Why
The repository already defines
uploadsin the full database creation path, but existing databases created before that table existed do not receive it automatically because there was no corresponding runtime migration.That causes runtime failures such as:
SQLITE_ERROR: no such table: uploadsChanges
utils/db-migrations/003-add-uploads-table.sqluploadstable if it does not existanswerIdScope
This PR only addresses schema evolution for existing databases.
It does not change:
Validation
uploadsuploadsNotes
This is kept separate from the rendering fixes because it addresses a different class of problem: stale local database schema rather than content rendering.