Repository navigation
fix: ensure FTS5 initialized on every startup (#544) - #557
Merged
Merged
Conversation
| // | ||
| // init_fts5() is idempotent (CREATE IF NOT EXISTS / TRIGGER IF NOT EXISTS), | ||
| // so it's safe to call on every open. | ||
| if !self.fts5_exists()? { |
🔍 Cora AI Code Review🟡 Warning (1)
Review powered by cora-cli · BYOK · MIT |
Fresh databases skip all migrations (version stamped directly at CURRENT_SCHEMA_VERSION), so migrate_v1_to_v2() — which calls init_fts5() — never runs. Existing databases at the correct version also skip migrations. In both cases FTS5 may be missing even though memories exist, causing FTS5 recall to return empty results. Add post-migration check in ensure_schema_version() that detects missing memories_fts table, initializes FTS5, and rebuilds the index if memories already exist. init_fts5() is idempotent so safe to call every open. - Update test_fts5_exists to reflect new auto-init behavior
ajianaz
force-pushed
the
fix/544-fts5-missing-on-startup
branch
from
July 4, 2026 04:02
027b991 to
e71b140
Compare
ajianaz
added a commit
that referenced
this pull request
Aug 13, 2026
fix: ensure FTS5 initialized on every startup (#544)
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.
Fresh databases skip all migrations (version stamped at CURRENT_SCHEMA_VERSION), so init_fts5() never runs. FTS5 recall returns empty results.
Add post-migration check in ensure_schema_version() that detects missing memories_fts table and initializes FTS5 + rebuilds index if memories exist.
Closes #544