From 1e66f4fa49b87fac0bd1ed6ab6c47bb022906992 Mon Sep 17 00:00:00 2001 From: valere Date: Thu, 23 Feb 2023 14:57:28 +0100 Subject: [PATCH] Fix broken migration --- .../sdk/internal/database/migration/MigrateSessionTo051.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo051.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo051.kt index b6eb87c600..f5729a1f5e 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo051.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo051.kt @@ -27,8 +27,8 @@ import org.matrix.android.sdk.internal.util.database.RealmMigrator internal class MigrateSessionTo051(realm: DynamicRealm) : RealmMigrator(realm, 51) { override fun doMigrate(realm: DynamicRealm) { - realm.schema.create("EventEntity") - .addField(EventEntityFields.IS_VERIFICATION_STATE_DIRTY, Boolean::class.java) - .setNullable(EventEntityFields.IS_VERIFICATION_STATE_DIRTY, true) + realm.schema.get("EventEntity") + ?.addField(EventEntityFields.IS_VERIFICATION_STATE_DIRTY, Boolean::class.java) + ?.setNullable(EventEntityFields.IS_VERIFICATION_STATE_DIRTY, true) } }