I am using Liquibase 3.4.1 with MySQL56 and run Liquibase via Spring Boot.
I have a changeset that includes adding a column to the existing table. The new column
has valueComputed
attribute with a simple select.
When I made a mistake in that select the changeset failed and migration stopped at that changeset. However the new column was commited to the database but without the proper value and, what's really bad, this changeset was not marked as run! The next time I ran migration Liquibase attempted to execute the changeset again, but failed because the column had been created already.
Why didn't Liquibase rollback a transaction when the changeset failed? How can I make my changeset transactional?
EDIT: Apparently, MySQL commits after every DDL command. If I specify rollback commands in rollback tag will Liquibase run then in case of failed changeset?