Mobile Bytes #1: Additive and Destructive Schema Changes

Hi @lHengl,

I am an engineer on the Device Sync team. I hear you and we agree that this is not an ideal experience for our developers. We have just begun a project to allow clients in Development Mode to make breaking schema changes that will automatically handle terminating/re-enabling sync and discarding the local realm file.

As for the best procedure to do this in the meantime, we agree that what you are doing is unfortunately the way to do it. Assuming you are testing in an emulator, the best way to go about making breaking schema changes is to:

  1. Terminate sync
  2. Remove the schema from the App Services UI
  3. Enable Sync
  4. Restart the emulator you are developing on
  5. Connect to sync and it will sync the now additive changes to the schema (because you removed it)

We are very excited to fix this behavior and are actively working on it! I will try to reach back out here when this work is completed.

Best,
Tyler

2 Likes