Split this PR db change in a separate migration

This commit is contained in:
Valere 2022-01-11 14:56:18 +01:00
parent 6798492cc3
commit 60ae416b36
1 changed files with 6 additions and 1 deletions

View File

@ -56,7 +56,7 @@ internal class RealmSessionStoreMigration @Inject constructor(
) : RealmMigration {
companion object {
const val SESSION_STORE_SCHEMA_VERSION = 20L
const val SESSION_STORE_SCHEMA_VERSION = 21L
}
/**
@ -89,6 +89,7 @@ internal class RealmSessionStoreMigration @Inject constructor(
if (oldVersion <= 17) migrateTo18(realm)
if (oldVersion <= 18) migrateTo19(realm)
if (oldVersion <= 19) migrateTo20(realm)
if (oldVersion <= 20) migrateTo21(realm)
}
private fun migrateTo1(realm: DynamicRealm) {
@ -415,6 +416,10 @@ internal class RealmSessionStoreMigration @Inject constructor(
chunkEntities.deleteAllFromRealm()
}
}
}
private fun migrateTo21(realm: DynamicRealm) {
Timber.d("Step 20 -> 21")
realm.schema.get("RoomSummaryEntity")
?.addField(RoomSummaryEntityFields.E2E_ALGORITHM, String::class.java)