I'm wondering, how is it possible to make Flyway baseline and outOfOrder work together?
The outOfOrder flag can be used when you are working with branches, so if steps appear in the "past" they are not set to "Ignored" but they are executed after they appear. For example if they are arriving with a branch.
I.e. a database has steps 1.0, 1.1, 1.2 and there is a cherry picked 2.2 patch to it. Then 2.0 and 2.1 comes with the regular release, but they are <2.2, so you have to use outOfOrder to install those.
The problem comes when a new database is created on the branch that contains 1.0, 1.1, 1.2 and 2.2, and a baseline is added. Now, baseline tells Flyway to SKIP everything before. So when 2.0 and 2.1 comes they are skipped, they are not even tagged as Ignored, they automatically become part of the baseline.
So what I'm thinking about is that maybe instead of baseline being an almighty step, it should be instead "fake success"-es on the currently known installations steps. Is there a better way, or how to such a thing?