From 2d52123c2578eff9eafa4d90cc2cd1a047fe75c2 Mon Sep 17 00:00:00 2001 From: Kasper Date: Wed, 2 Sep 2026 02:22:15 +0200 Subject: [PATCH] Enable PRAGMA foreign_keys --- src-native/library.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-native/library.rs b/src-native/library.rs index fcabb15..a57ea38 100644 --- a/src-native/library.rs +++ b/src-native/library.rs @@ -117,6 +117,10 @@ pub async fn open_library(paths: &Paths) -> Result { .connect() .await .context("Error connecting to library database")?; + sqlx::query("PRAGMA foreign_keys = ON") + .execute(&mut connection) + .await + .context("Failed to enable SQLite foreign keys")?; sqlx::migrate!("./src-native/migrations") .run(&mut connection) -- 2.51.2