From 506e4e1d0c0efef5f1ab4ec9773bdbd43fe9e4a8 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 2 Apr 2023 09:53:35 +0200 Subject: [PATCH] add index on disco.feature coloum --- .../1.json | 11 ++++++----- .../res/drawable/background_message_selected.xml | 13 +++++++++++++ .../android/database/entity/DiscoFeatureEntity.java | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 app/src/conversations/res/drawable/background_message_selected.xml diff --git a/app/schemas/im.conversations.android.database.ConversationsDatabase/1.json b/app/schemas/im.conversations.android.database.ConversationsDatabase/1.json index e6b328285..310304d8a 100644 --- a/app/schemas/im.conversations.android.database.ConversationsDatabase/1.json +++ b/app/schemas/im.conversations.android.database.ConversationsDatabase/1.json @@ -2,7 +2,7 @@ "formatVersion": 1, "database": { "version": 1, - "identityHash": "a4cee026f132d06fdad6ff6db418d041", + "identityHash": "8be54d59ea976565ba5a4f7a9faf9109", "entities": [ { "tableName": "account", @@ -1436,13 +1436,14 @@ }, "indices": [ { - "name": "index_disco_feature_discoId", + "name": "index_disco_feature_discoId_feature", "unique": false, "columnNames": [ - "discoId" + "discoId", + "feature" ], "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_disco_feature_discoId` ON `${TABLE_NAME}` (`discoId`)" + "createSql": "CREATE INDEX IF NOT EXISTS `index_disco_feature_discoId_feature` ON `${TABLE_NAME}` (`discoId`, `feature`)" } ], "foreignKeys": [ @@ -2693,7 +2694,7 @@ "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a4cee026f132d06fdad6ff6db418d041')" + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '8be54d59ea976565ba5a4f7a9faf9109')" ] } } \ No newline at end of file diff --git a/app/src/conversations/res/drawable/background_message_selected.xml b/app/src/conversations/res/drawable/background_message_selected.xml new file mode 100644 index 000000000..3e8ddf6d6 --- /dev/null +++ b/app/src/conversations/res/drawable/background_message_selected.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/im/conversations/android/database/entity/DiscoFeatureEntity.java b/app/src/main/java/im/conversations/android/database/entity/DiscoFeatureEntity.java index 6f33b5433..80a62a449 100644 --- a/app/src/main/java/im/conversations/android/database/entity/DiscoFeatureEntity.java +++ b/app/src/main/java/im/conversations/android/database/entity/DiscoFeatureEntity.java @@ -14,7 +14,7 @@ import androidx.room.PrimaryKey; parentColumns = {"id"}, childColumns = {"discoId"}, onDelete = ForeignKey.CASCADE), - indices = {@Index(value = {"discoId"})}) + indices = {@Index(value = {"discoId", "feature"})}) public class DiscoFeatureEntity { @PrimaryKey(autoGenerate = true)