Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Liquibase Rollback automatically when Update command fails?

Suppose I have a changeLog file that contains 3 changeSets. If I run the Liquibase Update command from the command line and it fails on the second changeSet, will Liquibase RollBack to before the update command began execution? Or will it keep the changes from changeSet 1?

like image 908
tjensen Avatar asked Mar 23 '26 06:03

tjensen


1 Answers

Changeset 1 will still be applied to the database and the DATABASECHANGELOG table will reflect that the changeset was applied. If you then fix whatever problem caused the update to fail and re-run your update, it will see that changeset 1 has already been deployed and only deploy changesets 2 and 3.

like image 87
SteveDonie Avatar answered Mar 25 '26 01:03

SteveDonie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!