use journal mode WAL for expand db use

This commit is contained in:
Alireza Ahmadi
2026-03-08 23:18:42 +01:00
parent 6ba547331e
commit 14ea27292f
3 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ func OpenDB(dbPath string) error {
if strings.Contains(dbPath, "?") {
sep = "&"
}
dsn := dbPath + sep + "_busy_timeout=10000"
dsn := dbPath + sep + "_busy_timeout=10000&_journal_mode=WAL"
db, err = gorm.Open(sqlite.Open(dsn), c)
if config.IsDebug() {