kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix stories index migration.
rodzic
07915db7bc
commit
168832c138
|
@ -22,7 +22,7 @@ import org.thoughtcrime.securesms.database.helpers.migration.V161_StorySendMessa
|
||||||
*/
|
*/
|
||||||
object SignalDatabaseMigrations {
|
object SignalDatabaseMigrations {
|
||||||
|
|
||||||
const val DATABASE_VERSION = 160
|
const val DATABASE_VERSION = 161
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun migrate(context: Application, db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
|
fun migrate(context: Application, db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
|
||||||
|
|
|
@ -8,6 +8,6 @@ import net.zetetic.database.sqlcipher.SQLiteDatabase
|
||||||
*/
|
*/
|
||||||
object V161_StorySendMessageIdIndex : SignalDatabaseMigration {
|
object V161_StorySendMessageIdIndex : SignalDatabaseMigration {
|
||||||
override fun migrate(context: Application, db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
|
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)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue