Liquibase Upgrade Causes Certain Changesets to Rerun

126 views Asked by At

Upgrading from Liquibase 4.4.2 to 4.23.0 (I know, shame on us for the lag) causes certain changesets to rerun in our existing databases. We then tried all of the versions from 4.23.0 down to 4.19.1 with the same result. Seemingly only changesets with double-quote string labels are affected by this issue.

At first I thought it had something to do with the author field not being followed by ":" but we have other changesets with the same structure that aren't rerun.

Example changeset structure from a sql file:

--liquibase formatted sql
--changeset cooldevname-modify-table-test-46.0.1 labels:"ABC-123,ABC-456,ABC-789"
alter table test_schema."test" rename to TEST;
--rollback select 'x' from dual;

After upgrading Liquibase and running update, Liquibase tries to reapply this changeset which causes a "table or view does not exist" exception because it was already successfully renamed when the changeset originally ran months ago.

Anyone else experience this and know how to work around it or do we have to now specify preconditions for all of the changesets that Liquibase tries to reapply?

0

There are 0 answers