aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/database.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service/database.vala')
-rw-r--r--libdino/src/service/database.vala11
1 files changed, 8 insertions, 3 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index e6c03bf6..6384fa78 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -293,9 +293,14 @@ public class Database : Qlite.Database {
mam_catchup = new MamCatchupTable(this);
settings = new SettingsTable(this);
init({ account, jid, entity, content_item, message, message_correction, real_jid, file_transfer, conversation, avatar, entity_identity, entity_feature, roster, mam_catchup, settings });
- exec("PRAGMA journal_mode = WAL");
- exec("PRAGMA synchronous = NORMAL");
- exec("PRAGMA secure_delete = ON");
+
+ try {
+ exec("PRAGMA journal_mode = WAL");
+ exec("PRAGMA synchronous = NORMAL");
+ exec("PRAGMA secure_delete = ON");
+ } catch (Error e) {
+ error("Failed to set database properties: %s", e.message);
+ }
}
public override void migrate(long oldVersion) {