fix(demo): recreate FTS5 index after seed restore#54
Merged
Conversation
`vendor/bin/imanager dump` (which is `sqlite3 .dump` under the hood)
silently skips FTS5 virtual tables. The seed restore therefore left
items_fts (and its shadow tables) missing even though schema_version
recorded the FTS migration as applied — `schema:migrate` saw no
pending work, the table never came back, and any item write
(saving a page, changing the admin password) blew up with:
SQLSTATE[HY000]: General error: 1 no such table: items_fts
The entrypoint now re-applies the FTS migration's CREATE VIRTUAL
TABLE after loading the seed and runs `imanager fts:rebuild` to
populate the index from the items the seed restored.
Verified locally: fresh `up -d --build` shows
`[OK] FTS index rebuilt; 9 row(s) indexed.` and item UPDATEs succeed.
Followup worth filing upstream: `imanager dump` should either include
virtual tables or warn loudly that the dump is incomplete.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vendor/bin/imanager dump(which issqlite3 .dumpunder the hood) silently skips FTS5 virtual tables. The seed restore therefore left items_fts (and its shadow tables) missing even though schema_version recorded the FTS migration as applied —schema:migratesaw no pending work, the table never came back, and any item write (saving a page, changing the admin password) blew up with:The entrypoint now re-applies the FTS migration's CREATE VIRTUAL TABLE after loading the seed and runs
imanager fts:rebuildto populate the index from the items the seed restored.Verified locally: fresh
up -d --buildshows[OK] FTS index rebuilt; 9 row(s) indexed.and item UPDATEs succeed.Followup worth filing upstream:
imanager dumpshould either include virtual tables or warn loudly that the dump is incomplete.