fix enabling foreign keys in sqlite
This commit is contained in:
parent
940688edd5
commit
9c56ec55a5
1 changed files with 3 additions and 1 deletions
|
@ -107,7 +107,9 @@ void Database::init()
|
||||||
if (errCode) {
|
if (errCode) {
|
||||||
throw std::runtime_error("Could not open database file.");
|
throw std::runtime_error("Could not open database file.");
|
||||||
}
|
}
|
||||||
sqlite3_db_config(db_, SQLITE_DBCONFIG_ENABLE_FKEY);
|
|
||||||
|
// sqlite3_db_config(db_, SQLITE_DBCONFIG_ENABLE_FKEY);
|
||||||
|
exec("PRAGMA foreign_keys = ON;");
|
||||||
|
|
||||||
int version = getVersion();
|
int version = getVersion();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue