Skip to content
Snippets Groups Projects
Commit 63009431 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

fix(1444): Create index only if marked as indexed - close #1444

parent 706eb908
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ export class SqliteTable<T> {
generateCreateIndexes() {
return this.keys()
.filter(key => this.fields[key]?.indexed)
.map((fieldName) => {
return `CREATE INDEX IF NOT EXISTS idx_${this.name}_${fieldName} ON ${this.name} (${fieldName});\n`;
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment