-
Type: Improvement
-
Resolution: Incomplete
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
Hi, I'm making migration from Java SDK to Kotlin SDK. But firstly I need to make migration the old database and I'm wondering what is the proper way of migration through few schema versions
For example:
schema 1:
class MyClass : RealmObject { val name: String? = null val count: Int? = null }
schema 2:
class MyClass : RealmObject { val name: String? = null val description: String? = null val count: Int? = null val size: Int? = null }
schema 3:
class MyClass : RealmObject { val name: String? = null val newNameOfDescription: String? = null val size: Int? = null }
According to this docs https://www.mongodb.com/docs/realm-sdks/kotlin/1.0.2/library-base/-realm%20-kotlin%20-s-d-k/io.realm.kotlin.migration/-automatic-schema-migration/-migration-context/enumerate.html I should use enumerate but how exactly should I differentiate schema version is enumerate?