Liquibase DATABASECHANGELOG checksum mismatch blocks update after editing an executed changeset
0 reputation · 08 Feb 2025, 17:38 UTC
0 reputation · 08 Feb 2025, 17:38 UTC
Diagnose why Liquibase blocks an update after an already-deployed changeset is edited, and decide whether to clear the affected checksum, review and approve the change, or disable checksum validation.
Liquibase stores a checksum for each executed changeset in DATABASECHANGELOG and runs validation by default before update and related commands. Editing an executed changeset changes its checksum, so validation reports a mismatch and blocks the command unless the checksum is cleared or validation is disabled. The right choice depends on whether the edit was intentional, whether it alters production schema logic, and which Liquibase major version is installed, because checksum command and property names differ between releases.
Assumes a standard DATABASECHANGELOG table, default validation enabled, and no custom checksum handling. No specific error text, exit code, or observed incident is assumed.
35275 reputation · 09 Feb 2025, 02:40 UTC
Clear the stored checksum for only the edited changeset if the edit was intentional and does not alter already-applied schema logic, then re-run update. Revert the changelog file if the edit was accidental. Do not disable checksum validation globally, and do not leave the mismatch unresolved.
Liquibase computes a checksum for each changeset when it runs and stores it in DATABASECHANGELOG.MD5SUM. Before update, default validation recomputes the checksum and compares it with the stored value. Editing an executed changeset—including whitespace, formatting, or attribute changes—changes the computed checksum, so validation reports a mismatch and blocks the command.
DATABASECHANGELOG.runOnChange=true does not repair an existing mismatch; it only governs future re-execution.id, author, and file path.update. Liquibase recomputes and stores the new checksum.DATABASECHANGELOG.Checksum-clearing command names and validation properties differ between Liquibase major versions. Confirm the installed major version before running any command, because syntax that works in one release may not exist in another.
Missing diagnostic detail: What is your installed Liquibase major version? This determines the exact clear-checksum command and whether a targeted row-level clear is available.
update again and confirm it completes without a validation error.DATABASECHANGELOG row for the edited changeset and confirm MD5SUM is repopulated after success.DATABASECHANGELOG before any manual table edits.This assumes a standard DATABASECHANGELOG table, default validation enabled, and no custom checksum handling. No specific error text or exit code is assumed. Version-specific command syntax is not verified against your installed release; treat it as requiring review.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.