Imagine I'm maintaining a separate branch for Production releases and a separate one for Dev environment (Master branch). Master branch is always ahead of the Production branch and suppose I want to do a hot fix on production branch. Flyway is used for DB migration and Flyway versions of each branch would be as follows.
Production branch
V_1
.
.
V_634
V_635
Master branch
V_1
.
.
V_634
V_635
V_636
V_637
As per this link I was able to overcome the initial issue that I was facing which Flyway give out for contradicting version numbers. And after this and couple of changes in dev environment, each branch would look like follows.
Production branch
V_1
.
.
V_634
V_635
V_635.1 (hotfix is applied here)
Master branch
V_1
.
.
V_634
V_635
V_636
V_637
V_638 (hotfix is applied here)
V_639
Now when imagine I need to do a production release after V_639. So when I do the release, the change is the V_638 would have already been applied in production with the hotfix. So it gives an error. Anyone knows how to manage this?