From 0d88a230132e181b1b09e65c3453ebc2cd947c2c Mon Sep 17 00:00:00 2001 From: davecraig Date: Mon, 12 Aug 2024 11:59:22 +0100 Subject: [PATCH] Remove RouteData from RealConfiguration 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. --- .../soundscape/database/local/RealmConfiguration.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/org/scottishtecharmy/soundscape/database/local/RealmConfiguration.kt b/app/src/main/java/org/scottishtecharmy/soundscape/database/local/RealmConfiguration.kt index 8bde079f..e9831a4b 100644 --- a/app/src/main/java/org/scottishtecharmy/soundscape/database/local/RealmConfiguration.kt +++ b/app/src/main/java/org/scottishtecharmy/soundscape/database/local/RealmConfiguration.kt @@ -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 @@ -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!!