Search code examples
androiddatabaserealmrealm-migration

Android Realm migrating from 1.x to 2.x


We're trying to migrate Realm from 1.x to a 2.x version. Do we need to provide migration in this case? We would like to keep the data obviously, but I think Realm deletes it if you update the app now. We havent released the 2.x version yet so now we need to deal with migration.


Solution

  • The Realm should be migrated automatically to the new format going from 1.x to 2.x since the file format changed.

    https://blog.realm.io/realm-java-2-0-mobile-platform-support/