fix(onebot): prepare message storage without blocking startup
Prevent existing message histories from being fully updated on the account startup path. Preserve current message behavior while allowing unfinished maintenance to continue safely after restarts. Add coverage for older databases, interrupted upgrades, new messages written during maintenance, and newly created account storage.
This commit is contained in:
4 files changed
+570
-172
No files matched your search
@@ -17,5 +17,6 @@ export function openSqliteDb(dbPath: string): DatabaseSync {
|
||||
const db = new DatabaseSync(dbPath);
|
||||
db.exec('PRAGMA journal_mode = WAL');
|
||||
db.exec('PRAGMA synchronous = NORMAL');
|
||||
db.exec('PRAGMA busy_timeout = 1000');
|
||||
return db;
|
||||
}
|
||||
Reference in new issue
Block a user