Skip to content

Commit

Permalink
Remove RouteData from RealConfiguration
Browse files Browse the repository at this point in the history
Adding RouteData was causing the database opening to fail - possibly
because there was already a database file and the schema differed. Once
we start using RouteData come up with a migration plan or use a separate
database.
  • Loading branch information
davecraig committed Aug 12, 2024
1 parent 4914388 commit 0d88a23
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.scottishtecharmy.soundscape.database.local
import org.scottishtecharmy.soundscape.database.local.model.TileData
import io.realm.kotlin.Realm
import io.realm.kotlin.RealmConfiguration
import org.scottishtecharmy.soundscape.database.local.model.RouteData

object RealmConfiguration {
private var realm: Realm? = null
Expand All @@ -12,7 +11,7 @@ object RealmConfiguration {
// has this object been created or opened yet?
if (realm == null || realm!!.isClosed()) {
// create the realm db based on the TileData model/schema
var config = RealmConfiguration.create(setOf(TileData::class, RouteData::class))
val config = RealmConfiguration.create(setOf(TileData::class))
realm = Realm.open(config)
}
return realm!!
Expand Down

0 comments on commit 0d88a23

Please sign in to comment.