mirror of
https://github.com/zadam/trilium.git
synced 2025-12-15 20:59:54 +01:00
fix(fts): remove index of components
This commit is contained in:
@@ -201,12 +201,9 @@ CREATE INDEX IDX_revisions_note_date
|
||||
ON revisions (noteId, utcDateCreated DESC);
|
||||
|
||||
-- ENTITY_CHANGES TABLE INDEXES
|
||||
CREATE INDEX IDX_entity_changes_sync
|
||||
CREATE INDEX IDX_entity_changes_sync
|
||||
ON entity_changes (isSynced, utcDateChanged);
|
||||
|
||||
CREATE INDEX IDX_entity_changes_component
|
||||
ON entity_changes (componentId, utcDateChanged DESC);
|
||||
|
||||
-- RECENT_NOTES TABLE INDEXES
|
||||
CREATE INDEX IDX_recent_notes_date
|
||||
ON recent_notes (utcDateCreated DESC);
|
||||
|
||||
@@ -481,20 +481,11 @@ export default function addFTS5SearchAndPerformanceIndexes() {
|
||||
log.info("Creating composite index for entity changes sync...");
|
||||
sql.executeScript(`
|
||||
DROP INDEX IF EXISTS IDX_entity_changes_sync;
|
||||
CREATE INDEX IF NOT EXISTS IDX_entity_changes_sync
|
||||
CREATE INDEX IF NOT EXISTS IDX_entity_changes_sync
|
||||
ON entity_changes (isSynced, utcDateChanged);
|
||||
`);
|
||||
indexesCreated.push("IDX_entity_changes_sync");
|
||||
|
||||
// Index for component-based queries
|
||||
log.info("Creating index for component-based entity change queries...");
|
||||
sql.executeScript(`
|
||||
DROP INDEX IF EXISTS IDX_entity_changes_component;
|
||||
CREATE INDEX IF NOT EXISTS IDX_entity_changes_component
|
||||
ON entity_changes (componentId, utcDateChanged DESC);
|
||||
`);
|
||||
indexesCreated.push("IDX_entity_changes_component");
|
||||
|
||||
// ========================================
|
||||
// RECENT_NOTES TABLE INDEXES
|
||||
// ========================================
|
||||
|
||||
Reference in New Issue
Block a user