From dacf6a967abdb8b78d0079324ee79f650e005b73 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sat, 30 Mar 2019 14:19:51 +0500 Subject: [PATCH] UI: DB: Move persistent pragma to migration. --- src/ui/db/databasesql.cpp | 1 - src/ui/db/migrations/1.sql | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/db/databasesql.cpp b/src/ui/db/databasesql.cpp index 8bfb4531..b989feea 100644 --- a/src/ui/db/databasesql.cpp +++ b/src/ui/db/databasesql.cpp @@ -2,7 +2,6 @@ const char * const DatabaseSql::sqlPragmas = "PRAGMA locking_mode=EXCLUSIVE;" - "PRAGMA journal_mode=WAL;" "PRAGMA synchronous=NORMAL;" ; diff --git a/src/ui/db/migrations/1.sql b/src/ui/db/migrations/1.sql index 43eefd6a..f005d34c 100644 --- a/src/ui/db/migrations/1.sql +++ b/src/ui/db/migrations/1.sql @@ -1,5 +1,7 @@ PRAGMA user_version = 1; +PRAGMA journal_mode=WAL; + CREATE TABLE IF NOT EXISTS app( app_id INTEGER PRIMARY KEY, path TEXT UNIQUE NOT NULL,