Search code examples
react-nativerealm

Add a new property to a class in realm of react native


When adding a new property to a new class, the error shows "migration is required due to the following errors: Property "XXX" has been added to latest object model".


Solution

  • You have probably changed the db schema. If your in development stage just drop your database and delete everything. But if you are in production you should follow the migration guide by incrementing the db version number.
    Check this out.