Adds setRequired to migration

This commit is contained in:
ericdecanini 2022-03-07 12:07:41 +01:00
parent 22b21b8c7f
commit e8432f3140

View file

@ -29,6 +29,7 @@ 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)
?.transform { it.set(SessionParamsEntityFields.LOGIN_TYPE, LoginType.UNKNOWN.value) } ?.transform { it.set(SessionParamsEntityFields.LOGIN_TYPE, LoginType.UNKNOWN.value) }
} }
} }