Replaces login type unknown value with name in migration

This commit is contained in:
ericdecanini 2022-03-15 15:23:03 +01:00
parent ef59faf160
commit 21459db634

View file

@ -30,6 +30,6 @@ class MigrateAuthTo005(realm: DynamicRealm) : RealmMigrator(realm, 5) {
realm.schema.get("SessionParamsEntity") realm.schema.get("SessionParamsEntity")
?.addField(SessionParamsEntityFields.LOGIN_TYPE, String::class.java) ?.addField(SessionParamsEntityFields.LOGIN_TYPE, String::class.java)
?.setRequired(SessionParamsEntityFields.LOGIN_TYPE, true) ?.setRequired(SessionParamsEntityFields.LOGIN_TYPE, true)
?.transform { it.set(SessionParamsEntityFields.LOGIN_TYPE, LoginType.UNKNOWN.value) } ?.transform { it.set(SessionParamsEntityFields.LOGIN_TYPE, LoginType.UNKNOWN.name) }
} }
} }