diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-07-05 18:15:40 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-07-05 18:15:40 +0200 |
commit | b0197c73ed4ee3babb85982d589863404853f915 (patch) | |
tree | 0a9ad8fd789793172d5b15b07d6ac7a0c04eb018 | |
parent | b2cae6770ba63fedb6059003e9aa0b113060807f (diff) |
server: Always enable foreign key handling
-rw-r--r-- | db.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -48,6 +48,8 @@ void db_init(void){ SQLITE(open_v2,"db.db",&database,SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE,NULL); SQLITE(busy_timeout,database,500); + SQLITE(exec,database,"pragma foreign_keys = 1",NULL,NULL,NULL); + sqlite3_stmt *stmt; int res = sqlite3_prepare_v2(database, "select version from Meta", -1, &stmt, NULL); if (res == SQLITE_OK && sqlite3_step(stmt) == SQLITE_ROW) { |