diff options
author | bobufa <bobufa@users.noreply.github.com> | 2018-08-13 23:48:15 +0200 |
---|---|---|
committer | bobufa <bobufa@users.noreply.github.com> | 2018-08-13 23:48:15 +0200 |
commit | f5547076d2397cec5c9d7374bd161f93327488c4 (patch) | |
tree | 1ae893d804c31f3c51694e5f67aa02732ba1a066 | |
parent | 1d9ce7f471c2aa3a70a9b0255ca39c0ec7a367e2 (diff) | |
download | dino-f5547076d2397cec5c9d7374bd161f93327488c4.tar.gz dino-f5547076d2397cec5c9d7374bd161f93327488c4.zip |
rename content db table -> content_item
-rw-r--r-- | libdino/src/service/database.vala | 4 | ||||
-rw-r--r-- | libdino/src/service/search_processor.vala | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala index 8475cc1b..8a470d12 100644 --- a/libdino/src/service/database.vala +++ b/libdino/src/service/database.vala @@ -43,7 +43,7 @@ public class Database : Qlite.Database { public Column<int> foreign_id = new Column.Integer("foreign_id") { not_null = true }; internal ContentTable(Database db) { - base(db, "contentx"); + base(db, "content_item"); init({id, conversation_id, time, local_time, content_type, foreign_id}); unique({content_type, foreign_id}, "IGNORE"); } @@ -228,7 +228,7 @@ public class Database : Qlite.Database { message.fts_rebuild(); } else if (oldVersion < 8) { exec(""" - insert into contentx (conversation_id, time, local_time, content_type, foreign_id) + insert into content_item (conversation_id, time, local_time, content_type, foreign_id) select conversation.id, message.time, message.local_time, 1, message.id from message join conversation on message.account_id=conversation.account_id and diff --git a/libdino/src/service/search_processor.vala b/libdino/src/service/search_processor.vala index 3f746981..5a14dfe7 100644 --- a/libdino/src/service/search_processor.vala +++ b/libdino/src/service/search_processor.vala @@ -63,7 +63,7 @@ public class SearchProcessor : StreamInteractionModule, Object { .outer_join_with(db.real_jid, db.real_jid.message_id, db.message.id) .with(db.account.enabled, "=", true); if (join_content) { - rows.join_on(db.content, "message.id=contentx.foreign_id AND contentx.content_type=1") + rows.join_on(db.content, "message.id=content_item.foreign_id AND content_item.content_type=1") .with(db.content.content_type, "=", 1); } if (with != null) { @@ -226,7 +226,7 @@ public class SearchProcessor : StreamInteractionModule, Object { public Gee.List<MessageItem> match_messages(string query, int offset = -1) { Gee.List<MessageItem> ret = new ArrayList<MessageItem>(); - QueryBuilder rows = prepare_search(query, false).limit(10); + QueryBuilder rows = prepare_search(query, true).limit(10); if (offset > 0) { rows.offset(offset); } |