From 94aa966f4600020bc479d45da33dc3ef17ba7111 Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Tue, 17 Mar 2026 10:31:39 +0100 Subject: [PATCH] fix: enable WAL mode for sqlite --- lib/database/app_database.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/database/app_database.dart b/lib/database/app_database.dart index 69c31464..e732242e 100644 --- a/lib/database/app_database.dart +++ b/lib/database/app_database.dart @@ -225,6 +225,9 @@ LazyDatabase _openConnection() { } } - return NativeDatabase(file); + return NativeDatabase(file, setup: (db) { + db.execute('PRAGMA journal_mode=WAL'); + db.execute('PRAGMA synchronous=NORMAL'); + }); }); }