Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-08-12 15:21:11 +02:00
Родитель edc0554fd2
Коммит 6e2ee1f001
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: C793F8B59F43CE7B
2 изменённых файлов: 14 добавлений и 10 удалений

Просмотреть файл

@ -9,21 +9,24 @@ package com.nextcloud.talk.data.database.model
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey
// ChatBlockEntity.kt:26: internalConversationId column references a foreign key but it is not part of an index. This may trigger full table scans whenever parent table is modified so you are highly advised to create an index that covers this column.
@Entity(
tableName = "ChatBlocks",
foreignKeys = [
androidx.room.ForeignKey(
entity = ConversationEntity::class,
parentColumns = arrayOf("internalId"),
childColumns = arrayOf("internalConversationId"),
onDelete = androidx.room.ForeignKey.CASCADE,
onUpdate = androidx.room.ForeignKey.CASCADE
)
ForeignKey(
entity = ConversationEntity::class,
parentColumns = arrayOf("internalId"),
childColumns = arrayOf("internalConversationId"),
onDelete = ForeignKey.CASCADE,
onUpdate = ForeignKey.CASCADE
)
],
indices = [
Index(value = ["internalConversationId"])
]
)
data class ChatBlockEntity(
@PrimaryKey(autoGenerate = true)

Просмотреть файл

@ -10,6 +10,7 @@ package com.nextcloud.talk.data.database.model
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey
import com.nextcloud.talk.data.user.model.UserEntity
import com.nextcloud.talk.models.json.conversations.ConversationEnums
@ -27,7 +28,7 @@ import com.nextcloud.talk.models.json.participants.Participant
)
],
indices = [
androidx.room.Index(value = ["accountId"])
Index(value = ["accountId"])
]
)
data class ConversationEntity(