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:
DrSmoothl committed 2026-07-30 09:57:00 +08:00
1 parent b1fd5dd0fe
commit caed31ca20
4 files changed
+570 -172

No files matched your search

+1
View File
@@ -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;
}