diff options
-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) { |