mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
fix: Skip FTS5 validation for sql.js databases in Docker
Resolves Docker test failures where sql.js databases (which don't support FTS5) were failing validation checks. The validateDatabaseHealth() method now checks FTS5 support before attempting FTS5 table queries. Changes: - Check db.checkFTS5Support() before FTS5 table validation - Log warning for sql.js databases instead of failing - Allows Docker containers using sql.js to start successfully Fixes: Docker entrypoint integration tests Related: feature/session-persistence-phase-1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -285,7 +285,14 @@ export class N8NDocumentationMCPServer {
|
||||
throw new Error('Database is empty. Run "npm run rebuild" to populate node data.');
|
||||
}
|
||||
|
||||
// Check if FTS5 table exists
|
||||
// Check FTS5 support before attempting FTS5 queries
|
||||
// sql.js doesn't support FTS5, so we need to skip FTS5 validation for sql.js databases
|
||||
const hasFTS5 = this.db.checkFTS5Support();
|
||||
|
||||
if (!hasFTS5) {
|
||||
logger.warn('FTS5 not supported (likely using sql.js) - search will use basic queries');
|
||||
} else {
|
||||
// Only check FTS5 table if FTS5 is supported
|
||||
const ftsExists = this.db.prepare(`
|
||||
SELECT name FROM sqlite_master
|
||||
WHERE type='table' AND name='nodes_fts'
|
||||
@@ -299,6 +306,7 @@ export class N8NDocumentationMCPServer {
|
||||
logger.warn('FTS5 index is empty - search will not work properly. Please run: npm run rebuild');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.info(`Database health check passed: ${nodeCount.count} nodes loaded`);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user