Search code examples
swift3realmrealm-mobile-platformrealm-migration

Is there a migration required when adding a new realm object in realm-swift?


Does realm need migration when adding a new object in realm-swift?

I already have an object in Realm. Now, I want to add to new Realm object.
Do I need to add migration for that?


Solution

  • No. You only need to perform a migration when you change an existing model/class in your Realm schema.

    A migration is only needed, when you are changing properties of existing objects. If you are adding a new Object model/new Object or just changing values of existing models, you don't need a migration.