Skip to content
Latchkey

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.

liquibase output
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.

Terminal
git diff -- db/changelog/002-orders.xml   # see what changed, then revert

Clear 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.

Terminal
liquibase clearCheckSums
liquibase update

Or pin a checksum with validCheckSum

For a one-off accepted change, record the new checksum on the changeset so validation passes.

changelog.xml
<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 validate in CI to catch edits early.
  • Pin a Liquibase version so checksum computation stays consistent.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →