I have an app using Spring and hibernate annotations. Made some schema changes that resulted in errors w/ an existing DB. Added liquibase Spring-bean and a db-changelog.xml that made the necessary schema adjustments, and the errors went away when I started my app again and everything was great.
I then deleted the DB so my app would regenerate a fresh DB on startup, as it does. Started my app and the liquibase Spring-bean barfed on load because it tried to do a dropColumn on a column that didn’t exist.
I fixed it with a precondition on the dropColumn changeSet.
So, how does liquibase handle both new and existing DBs? And shouldn’t this question be in the FAQ?
Do I have to include preconditions with every changeSet? If so, perhaps this should be added as a “Con” to your presentations, as the database version strategy does not impose this requirement.