mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 11:48:51 +03:00
Timeline rework: make sure migration doesn't crash
This commit is contained in:
parent
b370f84e08
commit
cd1da7348f
1 changed files with 3 additions and 1 deletions
|
@ -344,7 +344,9 @@ internal object RealmSessionStoreMigration : RealmMigration {
|
|||
private fun migrateTo18(realm: DynamicRealm) {
|
||||
Timber.d("Step 17 -> 18")
|
||||
realm.schema.get("ChunkEntity")?.apply {
|
||||
removeField("numberOfTimelineEvents")
|
||||
if (hasField("numberOfTimelineEvents")) {
|
||||
removeField("numberOfTimelineEvents")
|
||||
}
|
||||
var cleanOldChunks = false
|
||||
if (!hasField(ChunkEntityFields.NEXT_CHUNK.`$`)) {
|
||||
cleanOldChunks = true
|
||||
|
|
Loading…
Add table
Reference in a new issue