mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-22 06:59:21 +01:00
Set sqlite busy timeout
This commit is contained in:
parent
84264dad20
commit
450f43694a
1 changed files with 5 additions and 0 deletions
|
@ -201,6 +201,11 @@ class SqliteDb extends _$SqliteDb {
|
||||||
},
|
},
|
||||||
beforeOpen: (details) async {
|
beforeOpen: (details) async {
|
||||||
await customStatement("PRAGMA foreign_keys = ON;");
|
await customStatement("PRAGMA foreign_keys = ON;");
|
||||||
|
// technically we have a platform side lock to ensure only one
|
||||||
|
// transaction is running in any isolates, but for some reason we are
|
||||||
|
// still seeing database is locked error in crashlytics, let see if
|
||||||
|
// this helps
|
||||||
|
await customStatement("PRAGMA busy_timeout = 5000;");
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue