I followed the TaskTracker tutorial for Android and was successful in getting everything working and syncing.
Then, I went to Realm schema for Tasks collection and added “description” property as an optional string. Then I deployed my change.
In Android code, I added the following to the Task model (which I got from SDKs tab):
var description: String? = null
Upon starting the app I get this exception:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mongodb.tasktracker/com.mongodb.tasktracker.TaskActivity}: io.realm.exceptions.RealmMigrationNeededException: Migration is required due to the following errors:
- Property 'Task.description' has been added.
The documentation states that the database automatically handles all synced schema migrations.
If that’s the case, why do I get this error? What is the fix for this?