aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/omemo/src/logic/database.vala12
-rw-r--r--plugins/openpgp/src/database.vala8
2 files changed, 15 insertions, 5 deletions
diff --git a/plugins/omemo/src/logic/database.vala b/plugins/omemo/src/logic/database.vala
index 429b5f0b..ec5a0924 100644
--- a/plugins/omemo/src/logic/database.vala
+++ b/plugins/omemo/src/logic/database.vala
@@ -256,12 +256,14 @@ public class Database : Qlite.Database {
session = new SessionTable(this);
content_item_meta = new ContentItemMetaTable(this);
init({identity_meta, trust, identity, signed_pre_key, pre_key, session, content_item_meta});
+
try {
- exec("PRAGMA synchronous=0");
- } catch (Error e) { }
- try {
- exec("PRAGMA secure_delete=1");
- } catch (Error e) { }
+ exec("PRAGMA journal_mode = WAL");
+ exec("PRAGMA synchronous = NORMAL");
+ exec("PRAGMA secure_delete = ON");
+ } catch (Error e) {
+ error("Failed to set OMEMO database properties: %s", e.message);
+ }
}
public override void migrate(long oldVersion) {
diff --git a/plugins/openpgp/src/database.vala b/plugins/openpgp/src/database.vala
index 2bda06af..f488078c 100644
--- a/plugins/openpgp/src/database.vala
+++ b/plugins/openpgp/src/database.vala
@@ -36,6 +36,14 @@ public class Database : Qlite.Database {
this.account_setting_table = new AccountSetting(this);
this.contact_key_table = new ContactKey(this);
init({account_setting_table, contact_key_table});
+
+ try {
+ exec("PRAGMA journal_mode = WAL");
+ exec("PRAGMA synchronous = NORMAL");
+ exec("PRAGMA secure_delete = ON");
+ } catch (Error e) {
+ error("Failed to set OpenPGP database properties: %s", e.message);
+ }
}
public void set_contact_key(Jid jid, string key) {