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

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

parent fe5958ad
No related branches found
No related tags found
1 merge request!1430fix(1444): Create index only if marked as indexed - close #1444
Pipeline #32103 failed
......@@ -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.
Finish editing this message first!
Please register or to comment