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. This is deterministic.
What this error means
liquibase update fails with "Validation Failed", listing changesets whose checksums do not match. It identifies exactly which changeset was modified after running.
flyway
Validation Failed:
1 changesets check sum
db/changelog/002-orders.xml::add-orders::alice was:
8:abc123... but is now 8:def456...
Diagnose it: connectivity, then migration state
Migration failures in CI are usually the database not being ready rather than the migration being wrong. A service container accepts TCP connections before it is ready to serve queries, so a migration started too early fails in confusing ways.
Terminal
# wait for readiness, not just for the port to open
until pg_isready -h localhost -p 5432; do sleep 1; done
# then inspect what the tool believes has been applied
<migrate-tool> status
Common causes
A ran changeset was modified
The SQL or attributes of a changeset already recorded in DATABASECHANGELOG were edited, so its MD5SUM no longer matches.
Checksum algorithm or formatting change
Reformatting, encoding, or a Liquibase version that changes checksum computation can shift the value for an unchanged changeset.
How to fix it
Revert the edited changeset
Restore it to its original content and add a new changeset for the additional change.
Terminal
git diff -- db/changelog/002-orders.xml # see what changed, then revert
clearChecksums if intentional
When the edit is deliberate and the database reflects it, clear stored checksums so Liquibase recomputes them.
Terminal
liquibase clearCheckSums
liquibase update
How to prevent it
Treat ran changesets as immutable; add new ones for further changes.
Pin a Liquibase version so checksum computation stays consistent.
This is deterministic - retrying without reverting or clearing fails identically.
Frequently asked questions
What causes Liquibase "Validation Failed: checksum" in CI?
There are 2 common causes: a ran changeset was modified and checksum algorithm or formatting change. The SQL or attributes of a changeset already recorded in DATABASECHANGELOG were edited, so its MD5SUM no longer matches.
How do I fix Liquibase "Validation Failed: checksum" in CI?
There are 2 fixes depending on which cause you have: revert the edited changeset and clearchecksums if intentional. Work through them in order, since the first is the most common.
What does Liquibase "Validation Failed: checksum" in CI actually mean?
liquibase update fails with "Validation Failed", listing changesets whose checksums do not match.
How do I stop Liquibase "Validation Failed: checksum" in CI happening again?
Treat ran changesets as immutable; add new ones for further changes. The prevention section lists 3 changes that keep it from recurring.