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,
"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')"
]
}
}

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"},
childColumns = {"discoId"},
onDelete = ForeignKey.CASCADE),
indices = {@Index(value = {"discoId"})})
indices = {@Index(value = {"discoId", "feature"})})
public class DiscoFeatureEntity {
@PrimaryKey(autoGenerate = true)