-
Hello! Sometimes team members will modify the DB schema on separate branches, resulting in conflicting |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
imo simplest way is create migration file in merge CI btw there are so many possibilities with migration merge conflicts, customize it for your team environment |
Beta Was this translation helpful? Give feedback.
-
@lxia1220 is right that there are many possible solutions, but for those who find this on Google, here's a manual fix I often perform: Situation: You merge Conflict:
Typical Solution: Regenerate your migrations Steps:
|
Beta Was this translation helpful? Give feedback.
-
Currently my process to solve this:
Depending on your team size and PR frequency, you might have to do this multiple times. |
Beta Was this translation helpful? Give feedback.
-
This is a missing feature - #2488 - I'll cross post an interim solution here, which automates the suggestions in the above comments: It's a little script written by gburtini - github gist if you run it with FORCE_FIX=true:
if you run it with FORCE_FIX=false (the default behavior):
You do have to be sure to modify line 9 and line 133 to match your particular setup |
Beta Was this translation helpful? Give feedback.
imo simplest way is create migration file in merge CI
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#managing-a-merge-queue
btw there are so many possibilities with migration merge conflicts, customize it for your team environment