add index on disco.feature coloum

This commit is contained in:
Daniel Gultsch 2023-04-02 09:53:35 +02:00
parent c858b5346f
commit 506e4e1d0c
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
3 changed files with 20 additions and 6 deletions

View file

@ -2,7 +2,7 @@
"formatVersion": 1, "formatVersion": 1,
"database": { "database": {
"version": 1, "version": 1,
"identityHash": "a4cee026f132d06fdad6ff6db418d041", "identityHash": "8be54d59ea976565ba5a4f7a9faf9109",
"entities": [ "entities": [
{ {
"tableName": "account", "tableName": "account",
@ -1436,13 +1436,14 @@
}, },
"indices": [ "indices": [
{ {
"name": "index_disco_feature_discoId", "name": "index_disco_feature_discoId_feature",
"unique": false, "unique": false,
"columnNames": [ "columnNames": [
"discoId" "discoId",
"feature"
], ],
"orders": [], "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": [ "foreignKeys": [
@ -2693,7 +2694,7 @@
"views": [], "views": [],
"setupQueries": [ "setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "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')"
] ]
} }
} }

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:bottom="2dp"
android:end="4dp"
android:start="4dp"
android:top="2dp">
<shape>
<solid android:color="?colorSurfaceVariant" />
<corners android:radius="12dp" />
</shape>
</item>
</layer-list>

View file

@ -14,7 +14,7 @@ import androidx.room.PrimaryKey;
parentColumns = {"id"}, parentColumns = {"id"},
childColumns = {"discoId"}, childColumns = {"discoId"},
onDelete = ForeignKey.CASCADE), onDelete = ForeignKey.CASCADE),
indices = {@Index(value = {"discoId"})}) indices = {@Index(value = {"discoId", "feature"})})
public class DiscoFeatureEntity { public class DiscoFeatureEntity {
@PrimaryKey(autoGenerate = true) @PrimaryKey(autoGenerate = true)