Migrating from Realm Database Tips?

(if this is off-topic for this forum let me please apologize beforehand)

just wondering if there are any best ways to migrate away from realm to grdb without the realm library?

currently looking to migrate to a lighter weight solution (realm is currently overkill for my usecase) and would like to migrate away to grdb, but without having to leave realm as a dependency ongoing for another year or more...

just wondering if anyone has some experience with this?

Hello @andrekandore,

Are you able to read the content of a Realm database file without the Realm library? If not, you'll have to keep Realm as a dependency until your users have migrated.

You may reduce the time span by shipping versions of your app that are able to ask the user to upgrade. This would allow you to stage the transition, with "Realm-only", "Realm-to-GRDB", and eventually the "GRDB-only" version.

1 Like

thanks for he quick reply!

i haven't looked into the actual binary format of the realm db so i cant say much, i was hoping there might be some lightweight tools to import without realm, but i think its as you say, we'd need to give users s brief but reasonable window w/announcement to upgrade to preserve data.

fortunately its mostly caches, so not too critical (though unfortunate inconvenience) i think