https://kotlinlang.org logo
#android
Title
# android
t

turco082

07/03/2017, 3:22 PM
val config = RealmConfiguration.Builder() .schemaVersion(1) .deleteRealmIfMigrationNeeded() .migration(MyMigration()) .build() Realm.setDefaultConfiguration(config)
m

mgaetan89

07/03/2017, 3:26 PM
You can't use
deleteRealmIfMigrationNeeded()
and
migration()
at the same time. But this is more a Realm question, rather than Kotlin
m

martindg

07/03/2017, 3:29 PM
I'm agree with @mgaetan89 is more related with Realm, and I misunderstood the question, I just believe you want to migrate code to Kotlin, for that reason I sent you a link with Realm Kotlin example.
t

turco082

07/03/2017, 3:39 PM
I already made it work
tnx
b

budioktaviyan

07/03/2017, 3:55 PM
use
deleteRealmIfMigrationNeeded
just in case if you don't want to make a Realm Migration Schema
t

turco082

07/03/2017, 4:47 PM
ok tnx @budioktaviyan
21 Views