Fix stories index migration.

This commit is contained in:
Greyson Parrelli 2022-10-25 16:42:16 -04:00 committed by GitHub
parent 07915db7bc
commit 168832c138
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ import org.thoughtcrime.securesms.database.helpers.migration.V161_StorySendMessa
*/
object SignalDatabaseMigrations {
const val DATABASE_VERSION = 160
const val DATABASE_VERSION = 161
@JvmStatic
fun migrate(context: Application, db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {

View file

@ -8,6 +8,6 @@ import net.zetetic.database.sqlcipher.SQLiteDatabase
*/
object V161_StorySendMessageIdIndex : SignalDatabaseMigration {
override fun migrate(context: Application, db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
db.execSQL("CREATE INDEX story_sends_message_id_distribution_id_index ON story_sends (message_id, distribution_id)")
db.execSQL("CREATE INDEX IF NOT EXISTS story_sends_message_id_distribution_id_index ON story_sends (message_id, distribution_id)")
}
}