mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-28 21:23:07 +00:00
fix: rebuild FTS5 index after database rebuild to prevent stale rowid refs
The FTS5 content-synced index could retain phantom rowid references from previous rebuild cycles, causing 'missing row N from content table' errors on MATCH queries. - Add explicit FTS5 rebuild command in rebuild script after all nodes saved - Add FTS5 rebuild in test beforeAll as defense-in-depth - Rebuild nodes.db with consistent FTS5 index Conceived by Romuald Członkowski - www.aiadvisors.pl/en Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
3
dist/scripts/rebuild.js
vendored
3
dist/scripts/rebuild.js
vendored
@@ -130,6 +130,9 @@ async function rebuild() {
|
||||
}
|
||||
}
|
||||
console.log(`💾 Save completed: ${saved} nodes saved successfully`);
|
||||
console.log('\n🔍 Rebuilding FTS5 search index...');
|
||||
db.prepare("INSERT INTO nodes_fts(nodes_fts) VALUES('rebuild')").run();
|
||||
console.log('✅ FTS5 index rebuilt successfully');
|
||||
console.log('\n🔍 Running validation checks...');
|
||||
try {
|
||||
const validationResults = validateDatabase(repository);
|
||||
|
||||
Reference in New Issue
Block a user