Liquibase "Validation Failed: ... checksum" in CI
Liquibase stores an MD5SUM for each changeset in DATABASECHANGELOG. When a changeset that already ran is edited, its recomputed checksum differs and Liquibase fails validation to protect history.
What this error means
liquibase update fails with "Validation Failed", listing changesets whose checksums do not match. It is deterministic and identifies exactly which changeset was modified after running.
Validation Failed:
1 changesets check sum
db/changelog/002-orders.xml::add-orders::alice was:
8:abc123... but is now 8:def456...Common causes
A ran changeset was modified
The SQL or attributes of a changeset already recorded in DATABASECHANGELOG were edited, so its new MD5SUM no longer matches the stored one.
Checksum algorithm or formatting change
Reformatting, encoding, or a Liquibase version that changes how checksums are computed can shift the value for an otherwise-unchanged changeset.
How to fix it
Revert the edited changeset
Restore the changeset to its original content and add a new changeset for the additional change.
git diff -- db/changelog/002-orders.xml # see what changed, then revertClear checksums if the change is intentional
When the edit is deliberate and the database already reflects it, clear the stored checksums so Liquibase recomputes them on the next run.
liquibase clearCheckSums
liquibase updateOr pin a checksum with validCheckSum
For a one-off accepted change, record the new checksum on the changeset so validation passes.
<changeSet id="add-orders" author="alice">
<validCheckSum>8:def456...</validCheckSum>
...
</changeSet>How to prevent it
- Treat ran changesets as immutable; add new ones for further changes.
- Run
liquibase validatein CI to catch edits early. - Pin a Liquibase version so checksum computation stays consistent.