mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
Turn on foreign keys at startup
This commit is contained in:
parent
b48ef649a3
commit
262a7d9065
@ -54,6 +54,9 @@ pub fn setup_database() -> Result<(), Error> {
|
|||||||
| rusqlite::OpenFlags::SQLITE_OPEN_NOFOLLOW,
|
| rusqlite::OpenFlags::SQLITE_OPEN_NOFOLLOW,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
// Turn on foreign keys
|
||||||
|
connection.execute("PRAGMA foreign_keys = ON", ())?;
|
||||||
|
|
||||||
// Save the connection globally
|
// Save the connection globally
|
||||||
{
|
{
|
||||||
let mut db = GLOBALS.db.blocking_lock();
|
let mut db = GLOBALS.db.blocking_lock();
|
||||||
|
Loading…
Reference in New Issue
Block a user