diff --git a/src/core/db.rs b/src/core/db.rs index 080e586..d9a0cff 100644 --- a/src/core/db.rs +++ b/src/core/db.rs @@ -47,6 +47,7 @@ pub struct DatabaseStats { impl Database { pub fn new(path: &Path) -> Result { let conn = Connection::open(path)?; + conn.pragma_update(None, "foreign_keys", "ON")?; let db = Self { conn }; db.init_schema()?; Ok(db)