Always consolidate the WAL file and VACUUM to start

This commit is contained in:
Simon Quigley 2025-01-25 23:03:27 -06:00
parent 565be5e97d
commit e39e2d4c49

View File

@ -84,6 +84,8 @@ bool init_database(const QString& database_path) {
ci_query_exec(&pragma_query, "PRAGMA journal_mode = WAL;");
ci_query_exec(&pragma_query, "PRAGMA synchronous = NORMAL;");
ci_query_exec(&pragma_query, "PRAGMA foreign_keys = ON;");
ci_query_exec(&pragma_query, "PRAGMA wal_checkpoint(TRUNCATE);");
ci_query_exec(&pragma_query, "VACUUM;");
}
// Run the schema creation (or migration) statements