Skip to content

fix(demo): recreate FTS5 index after seed restore#54

Merged
bigin merged 1 commit into
masterfrom
fix/seed-restore-recreates-fts
May 15, 2026
Merged

fix(demo): recreate FTS5 index after seed restore#54
bigin merged 1 commit into
masterfrom
fix/seed-restore-recreates-fts

Conversation

@bigin
Copy link
Copy Markdown
Owner

@bigin bigin commented May 15, 2026

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.

`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.
@bigin bigin merged commit c64ca80 into master May 15, 2026
@bigin bigin deleted the fix/seed-restore-recreates-fts branch May 15, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant