Optimize database after running migrations

This commit is contained in:
Fedor Indutny
2022-12-13 09:07:48 -08:00
committed by GitHub
parent c98993899a
commit e08a2fa86c

View File

@@ -1993,4 +1993,8 @@ export function updateSchema(db: Database, logger: LoggerType): void {
runSchemaUpdate(userVersion, db, logger);
}
if (userVersion !== maxUserVersion) {
db.pragma('optimize');
}
}