Timeline rework: make sure migration doesn't crash
This commit is contained in:
parent
b370f84e08
commit
cd1da7348f
|
@ -344,7 +344,9 @@ internal object RealmSessionStoreMigration : RealmMigration {
|
|||
private fun migrateTo18(realm: DynamicRealm) {
|
||||
Timber.d("Step 17 -> 18")
|
||||
realm.schema.get("ChunkEntity")?.apply {
|
||||
if (hasField("numberOfTimelineEvents")) {
|
||||
removeField("numberOfTimelineEvents")
|
||||
}
|
||||
var cleanOldChunks = false
|
||||
if (!hasField(ChunkEntityFields.NEXT_CHUNK.`$`)) {
|
||||
cleanOldChunks = true
|
||||
|
|
Loading…
Reference in New Issue