]> git.sesse.net Git - pkanalytics/commitdiff
We want foreign key constraints enforced; duh.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 4 May 2023 20:41:38 +0000 (22:41 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 4 May 2023 20:41:38 +0000 (22:41 +0200)
main.cpp

index 907bc2fc2c81c1c462452686bcf914cff9ebe88f..a20125a61edbb7770bbb9d8ff19b4c506931ec72 100644 (file)
--- 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;
 }