Rollback without tag in changeset

We are using the git flow model for our development and trying to integrate liquibase for managing the database versioning efficiently. The problem comes when a developer is working on a feature branch and has made a DB script which is executed on his database and another developer’s database, but it is not yet part of any release so it is not yet tagged. Now that feature is tested and becomes part of release and we tag the changeset and execute it on production.

The questions is how to rollback the changes made on the developer’s machine because there was no tag defined at the moment when the script got executed and when we try to update it will the current tag it will show error “The table already exists”.

How to manage these conditions through liquibase efficiently ?

Hi Salman, did you get any update on this issue ?

@madhukiran1988

I’m not exactly sure if @SalmanRaza is referring to a Github tag, or a Liquibase tag, but it is possible to do a Liquibase rollback without a Liquibase tag. You can use the rollbackToDate or rollbackCount Liquibase command to rollback changesets.

One way to handle the “table already exist” error is to add a precondition to your changeset.

Hi @SalmanRaza Agree with the statements above. In addition, if you need to rollback a certain changeset specifically, you can use the rollbackOneChangeset command in the Pro version for that specific changeset.