Fix stories index migration.

This commit is contained in:
Greyson Parrelli committed 2022-10-25 16:43:11 -04:00
1 parent e2ef8a14f1
commit 8ea1e1acf9
2 files changed
+2 -2

No files matched your search

@@ -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) {
@@ -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)")
}
}