Adds setRequired to migration

This commit is contained in:
ericdecanini 2022-03-07 12:07:41 +01:00
parent 22b21b8c7f
commit e8432f3140
1 changed files with 1 additions and 0 deletions

View File

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