How to migrate data from SQLite

(Yap Xia Tan) #1

My existing app data is on SQlite. I am trying to migrate the data from Sqlite to Realm.
Is there any solution for realm in react native?

(Kenneth Geisshirt) #2

We don’t have a tool for migrating SQLite to Realm. If you can export your existing database as JSON, you can use JSON.parse() to create JavaScript objects and insert them into Realm.

If you SQLite datamodel has join tables and foreign keys for modelling one-to-many or many-to-many relations, you will have to write a migration function yourself.