Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order for Liquibase to validate that neither the database, nor the executed changesets, have been altered, Liquibase generates hashes of every changeset.
When a changeset is executed in the database, its hash is persisted in the database.
Before determing how the database should be updated, Liquibase compares the hashes, calculated from the xml, with the hashed persisted in the db. If these don't correspond, Liquibase cannot determine what needs to be updated.

What to do when Liquibase says that changesets have been altered?

In that case, we can only

  • drop the entire schema and recreate it
  • alter the database and hashes manually, which is very error-prone.
  • revert the changes done to the xml files

3. Order of execution

Example:

...