Re Executing changesets after clear-checksums

Hello Liquibase,

We have Liquibase integrated with our spring boot project (spring boot v3.5.6). We have upgraded the Liquibase version from 4.22.0 to 4.33.0. Post upgrade we were running the Liquibase job and we were getting checksum mismatch errors for a few changesets. We came to know that the property spring.liquibase.clear-checksums=true will clear all checksums, recompute and update them in the DATABASECHANGELOG table.

My question here is post updating the checksums, will it try to re-execute the already executed changesets again ? Since many of the changesets has insert and update queries written in them and rerunning will might throw errors or insert faulty values in the table. Let me know about it, thanks.

Hi @zenith7781 ! Welcome to the community.

Previously executed changesets should not be re-executed after clearing checksums. Their checksums will be recalculated and inserted into the DATABASECHANGELOG table.

The only possible edge case would be the handling of any changesets with the attribute runOnChange=true. When a changeset has that attribute and there is a checksum mismatch at deploy time, Liquibase will try to rerun that changeset and update the checksum. This is handy for things like views or functions that can be redefined in a single changeset to avoid changelog bloat.

1 Like