How to deal with conflicts in db migrations between environments
Recently, our prod and staging environments got out of sync as we had to hotfix some fixes into prod. However, this now means that we have different migrations with the same number in 2 different environments that we now need to reconcile.
Sample timeline
Sample timeline
- Staging and prod are both at migrations 33
- Feature work gets deployed to staging, at migration 34
- Hotfix that needs a migration gets pushed to prod, also at migration 34 (different one though)
- How do we pull in the changes from 3 into 2?