mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-28 03:48:37 +03:00
Adds setRequired to migration
This commit is contained in:
parent
22b21b8c7f
commit
e8432f3140
1 changed files with 1 additions and 0 deletions
|
@ -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) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue