I´m starting with Liquibase for a new project.
(I my past I already used some different DB maintenance tools.)
There is one thing which I didn´t find a solution for in Liquibase:
Say, I have a number of ChangeSets (e.g. defined in XML) already applied to the database. Than, there is a new ChangeSet defined in the XML but between already existing ChangeSets.
For better understanding:
ChangeSets applied to database: A, B, C
XML with ChangeSets is changed and new ChangeSets are: A, B, D, C
Applying ChangeSet D on the database despite having already A,B,C applied might be working fine. But if applied to a new database, D could fail because if relies on some structure created by C.
From my previous experience with DB maintain tools I expected to get an error because the order of the ChangeSets would now have changed. But that´s not the case; the change is just applied to the existing database.
Is there a way to tell Liquibase to check the order and fail if there are created new ChangeSets between already applied ones?
If not, how should we deal with such cases?
Of course, the CI pipeline would fail in this case. But personally I find it critical that the ChangeSet order is not checked by Liquibase itself. Or do I oversee something?