From: Steinar H. Gunderson Date: Thu, 4 May 2023 20:41:38 +0000 (+0200) Subject: We want foreign key constraints enforced; duh. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=091706430ebd7b068c985c67021a331e148bcccd;p=pkanalytics We want foreign key constraints enforced; duh. --- diff --git a/main.cpp b/main.cpp index 907bc2f..a20125a 100644 --- a/main.cpp +++ b/main.cpp @@ -453,6 +453,7 @@ sqlite3 *open_db(const char *filename) sqlite3_exec(db, "PRAGMA journal_mode=WAL", nullptr, nullptr, nullptr); // Ignore errors. sqlite3_exec(db, "PRAGMA synchronous=NORMAL", nullptr, nullptr, nullptr); // Ignore errors. + sqlite3_exec(db, "PRAGMA foreign_keys=ON", nullptr, nullptr, nullptr); // Ignore errors. return db; }