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 1. Staging and prod are both at migrations 33 2. Feature work gets deployed to staging, at migration 34 3. Hotfix that needs a migration gets pushed to prod, also at migration 34 (different one though) 4. How do we pull in the changes from 3 into 2? We have 2 migrations with the same number. Bumping one of them results in one env being broken one way or another, as that migration gets skipped when migrate is run.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?