Fix index creation in the migration

This commit is contained in:
Ensar Sarajčić 2023-07-18 11:45:47 +02:00
parent 555b6ebea3
commit d560720ac3
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ abstract class MessagesDatabase : RoomDatabase() {
override fun migrate(database: SupportSQLiteDatabase) {
database.apply {
execSQL("CREATE TABLE IF NOT EXISTS `recycle_bin_messages` (`id` INTEGER PRIMARY KEY, `deleted_ts` INTEGER NOT NULL)")
execSQL("CREATE UNIQUE INDEX `index_recycle_bin_messages_id` ON `recycle_bin_messages` (`id`)")
execSQL("CREATE UNIQUE INDEX IF NOT EXISTS `index_recycle_bin_messages_id` ON `recycle_bin_messages` (`id`)")
}
}
}