diff --git a/services/sql.js b/services/sql.js index ae50a6667..f24c17726 100644 --- a/services/sql.js +++ b/services/sql.js @@ -16,6 +16,8 @@ const dbConnected = createConnection(); let dbReadyResolve = null; const dbReady = new Promise((resolve, reject) => { dbConnected.then(async db => { + await execute("PRAGMA foreign_keys = ON"); + dbReadyResolve = () => { log.info("DB ready.");