diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index 0ccb4804e..1399dd957 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -968,7 +968,6 @@ export default class DocsService { await db.exec("PRAGMA busy_timeout = 3000;"); - await runSqliteMigrations(db); // First create the table if it doesn't exist await db.exec(`CREATE TABLE IF NOT EXISTS ${DocsService.sqlitebTableName} ( id INTEGER PRIMARY KEY AUTOINCREMENT, @@ -978,6 +977,8 @@ export default class DocsService { embeddingsProviderId STRING )`); + await runSqliteMigrations(db); + this.sqliteDb = db; }