Safe to Release Migration While Users Are Active?
We’re planning a backend data migration. Just wondering — is it safe to release the migration while users are actively using the app, or should we schedule some downtime?
Is the implementation designed to be backward-compatible with the schema to ensure safe migration while users are active?
@prastoin @Guillaume
2 Replies
Schedule some downtime, it's safer to do it this way rather than with active users
Also, remember to make a backup before upgrade in case anything goes wrong after upgrade
@Jay Patel we are doing our best to avoid breaking change but we still have some regularly that can lead to downtime if you are not careful. Here are where the breaking changes can happen:
- API breaking changes: if you are deploying FE and BE together (which is the case on the basic install), you should be fine. If you are deploying them separately, make sure to deploy them at the same moment
- Database breaking changes: make sure to run yarn command:prod upgrade right after deploy. This is were you can have a bit of downtime for your users
Breaking changes impacts will be less and less important
- our APIs get more mature (for instance we are currently migrating our view system from workspace_xxx schema to core schema, it's a one shot that we prefer to do now rather than in 1 year => these changes will be less and less frequents)
- we are re-working the upgrade command to make it faster (reduce downtime) and to allow multi version upgrade, so you don't have to go through each minor version
On the long run, we will stop making breaking changes in most versions. We will likely group them together and warn self hosters about them