Set omemo+openpgp database properties to be the same as main db
This commit is contained in:
parent
45c0ac4104
commit
4ce2bd8cd2
|
@ -256,12 +256,14 @@ public class Database : Qlite.Database {
|
||||||
session = new SessionTable(this);
|
session = new SessionTable(this);
|
||||||
content_item_meta = new ContentItemMetaTable(this);
|
content_item_meta = new ContentItemMetaTable(this);
|
||||||
init({identity_meta, trust, identity, signed_pre_key, pre_key, session, content_item_meta});
|
init({identity_meta, trust, identity, signed_pre_key, pre_key, session, content_item_meta});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
exec("PRAGMA synchronous=0");
|
exec("PRAGMA journal_mode = WAL");
|
||||||
} catch (Error e) { }
|
exec("PRAGMA synchronous = NORMAL");
|
||||||
try {
|
exec("PRAGMA secure_delete = ON");
|
||||||
exec("PRAGMA secure_delete=1");
|
} catch (Error e) {
|
||||||
} catch (Error e) { }
|
error("Failed to set OMEMO database properties: %s", e.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void migrate(long oldVersion) {
|
public override void migrate(long oldVersion) {
|
||||||
|
|
|
@ -36,6 +36,14 @@ public class Database : Qlite.Database {
|
||||||
this.account_setting_table = new AccountSetting(this);
|
this.account_setting_table = new AccountSetting(this);
|
||||||
this.contact_key_table = new ContactKey(this);
|
this.contact_key_table = new ContactKey(this);
|
||||||
init({account_setting_table, contact_key_table});
|
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) {
|
public void set_contact_key(Jid jid, string key) {
|
||||||
|
|
Loading…
Reference in a new issue