Hi all, my first message here.
I’m not sure how to implement rollback in my cicd pipeline using liquibase.
I have my application code and liquibase changsets in my git repository. When we release a new version the CICD software deploys the new version of the application and executes the changesets in the appropriate environment. Executing the changesets consists of calling ‘update’ and then ‘tag’ with the new version number of the application, for example 1.2.
My problem occurs when a new version of the application only involves a code change and there is no new changeset to run. The CICD pipeline executes the ‘update’ and the ‘tag’ and overwrites the new tag in the DATABASECHANGELOG table (to 1.3 for example). These types of changes are common and the version number can be updated several times without new liquibase changesets. Let’s assume that we have updated to version 1.7.
If after this we want to rollback to version 1.2 liquibase will tell me that the label does not exist. I don’t know if I’m following the right approach. From my point of view, the ideal is that all the tags that are applied to the liquibase changesets will be preserved, even if there are no changes in the database.
Maybe there is a better way to do it but I don’t know.
Thanks in advance.