Is there a way to make Liquibase figure out whether to run an
"update" versus a "rollback"?
When we deploy a set of code in an environment, we want the related
DB changes (using Liquibase update) to be applied in lockstep. We may
sometimes need to roll back the code deployed, which simply involves
deploying an older set of code (the older code overwrites the newer
code). However in the case of Liquibase, running an update with an
earlier changeset will not do anything since there is nothing new to
be applied. However, the DB still has changes related to the
newer Liquibase changeset which might pose a problem (eg if the
structure of a table was changed). In this case, we may specifically
require to run a "rollback" instead of an "update"
which requires human intervention.
Am I missing an option in Liquibase that would make my life easier?