Add more features to the query generator

This commit is contained in:
2026-04-18 14:59:23 +01:00
parent f3f1c42699
commit 9c5d39edfb
19 changed files with 375 additions and 83 deletions
+2 -3
View File
@@ -406,10 +406,9 @@ class SQLiteSchemaManager {
if (!existingIndexes.includes(index.indexName)) {
console.log(`Creating index: ${index.indexName}`);
const fields = index.indexTableFields
.map((f) => `"${f.value}"`)
.map((f) => `"${f}"`)
.join(", ");
const unique = index.indexType === "regular" ? "" : ""; // SQLite doesn't have FULLTEXT in CREATE INDEX
this.db.run(`CREATE ${unique}INDEX "${index.indexName}" ON "${table.tableName}" (${fields})`);
this.db.run(`CREATE INDEX "${index.indexName}" ON "${table.tableName}" (${fields})`);
}
}
}