From 2df81c3a834e3aec0b403e47003b5c7bde53c9a8 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 19 Dec 2017 22:24:41 -0500 Subject: [PATCH] forgot to enable the constraints immediatelly after connecting --- services/sql.js | 2 ++ 1 file changed, 2 insertions(+) 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.");