mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
Split this PR db change in a separate migration
This commit is contained in:
parent
6798492cc3
commit
60ae416b36
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue