mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 19:58:57 +03:00
Fix crash with Realm
This commit is contained in:
parent
d69881f321
commit
a464c910f8
2 changed files with 4 additions and 6 deletions
|
@ -53,7 +53,7 @@ internal abstract class AuthModule {
|
|||
.name("matrix-sdk-auth.realm")
|
||||
.modules(AuthRealmModule())
|
||||
.schemaVersion(AuthRealmMigration.SCHEMA_VERSION)
|
||||
.migration(AuthRealmMigration())
|
||||
.migration(AuthRealmMigration)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,12 +20,10 @@ import io.realm.DynamicRealm
|
|||
import io.realm.RealmMigration
|
||||
import timber.log.Timber
|
||||
|
||||
internal class AuthRealmMigration : RealmMigration {
|
||||
internal object AuthRealmMigration : RealmMigration {
|
||||
|
||||
companion object {
|
||||
// Current schema version
|
||||
const val SCHEMA_VERSION = 2L
|
||||
}
|
||||
// Current schema version
|
||||
const val SCHEMA_VERSION = 2L
|
||||
|
||||
override fun migrate(realm: DynamicRealm, oldVersion: Long, newVersion: Long) {
|
||||
Timber.d("Migrating Auth Realm from $oldVersion to $newVersion")
|
||||
|
|
Loading…
Add table
Reference in a new issue