fix: sqlite migrations should ran after the table is created

This commit is contained in:
nathants 2025-07-14 10:28:24 -10:00
parent 536f0065d2
commit 22a9fb2cb1
No known key found for this signature in database

View file

@ -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;
}