diff options
author | fiaxh <git@lightrise.org> | 2020-12-27 17:24:48 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-12-27 17:25:53 +0100 |
commit | c454bd904d1b9641ed333b71e206bd253fb9e9df (patch) | |
tree | d0810f13f15f11d457df47d6d25e45942cb86152 /libdino/src/service | |
parent | cc01374d3cb6a8bf477e8f96378f20b9aff57536 (diff) | |
download | dino-c454bd904d1b9641ed333b71e206bd253fb9e9df.tar.gz dino-c454bd904d1b9641ed333b71e206bd253fb9e9df.zip |
Make db version 18 downgradable
fixes #970
Diffstat (limited to 'libdino/src/service')
-rw-r--r-- | libdino/src/service/database.vala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala index 8b3e101d..652971a0 100644 --- a/libdino/src/service/database.vala +++ b/libdino/src/service/database.vala @@ -400,10 +400,10 @@ public class Database : Qlite.Database { if (oldVersion < 18) { try { exec("DROP INDEX contentitem_conversation_hide_localtime_time_idx"); - exec("CREATE INDEX contentitem_conversation_hide_time_idx ON content_item (conversation_id, hide, time)"); + exec("CREATE INDEX IF NOT EXISTS contentitem_conversation_hide_time_idx ON content_item (conversation_id, hide, time)"); exec("DROP INDEX message_account_counterpart_localtime_idx"); - exec("CREATE INDEX message_account_counterpart_time_idx ON message (account_id, counterpart_id, time)"); + exec("CREATE INDEX IF NOT EXISTS message_account_counterpart_time_idx ON message (account_id, counterpart_id, time)"); exec("DROP INDEX filetransfer_localtime_counterpart_idx"); } catch (Error e) { |