diff --git a/server/database.js b/server/database.js index 156c295bc..3ec406509 100644 --- a/server/database.js +++ b/server/database.js @@ -55,7 +55,6 @@ class Database { "patch-monitor-basic-auth.sql": true, "patch-status-page.sql": true, "patch-proxy.sql": true, - "patch-monitor-expiry-notification.sql": true, } /** @@ -126,6 +125,11 @@ class Database { await R.exec("PRAGMA cache_size = -12000"); await R.exec("PRAGMA auto_vacuum = FULL"); + // This ensures that an operating system crash or power failure will not corrupt the database. + // FULL synchronous is very safe, but it is also slower. + // Read more: https://sqlite.org/pragma.html#pragma_synchronous + await R.exec("PRAGMA synchronous = FULL"); + console.log("SQLite config:"); console.log(await R.getAll("PRAGMA journal_mode")); console.log(await R.getAll("PRAGMA cache_size"));