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

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.

Related guides

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