This is our scenario:
We currently have 10.000+ devices running our app in version v1.x.x. In v2.0.0, we’re migrating from AsyncStorage to Realm. Let’s say the data we’re storing is a single object that looks like this:
{
foo: 123
}
Our plan is for the v2 version to check if the app has migrated from AsyncStorage or not. If it hasn’t it will run a script that converts it into the new schema and saves it into Realm. So far so good.
After a while, we want to do some schema changes in our Realm. Let’s say we rename a field for instance, in v2.1.0. The Realm schema version is changed from 0 to 1. New shape of the data:
{
bar: 123
}
The clients that had already installed and run the v2.0.0 version of the app will be fine with this change, because when Realm starts, the 0 to 1 migration will run and perform the change. But, users that come directly from v1.x.x to v2.1.0, will be migrating their data from AsyncStorage into schema 1 instead of schema 0, correct?
If so - does that mean that we will always have to make sure that the AsyncStorage → Realm migration first performs the same updates as the Realm schema migrations have done?