Search code examples
mavenliquibasechangeset

Liquibase checksum validation error without any changes


Maven fires liquibase validation fail even no changes was made in changeset.

My database is oracle.

Situation:

  1. In DB changelog table was record for changeset <changeSet id="1" author="me" dbms="oracle">;

  2. Then by mistake i added another changeset <changeSet id="1" author="me" dbms="hsqldb">

  3. Reruned liquibase scripts Maven fired checksum validation error.

  4. Then i changed hsqldb changeSet to <changeSet id="2" author="me" dbms="hsqldb">

  5. Maven still firing checksum validation error.

  6. Then i changed first changeSet checksum in DB manually to current checkSum and scripts runned successfully.

Everything looks nice ,but when i redeploy whole application and run liquibase scripts checksum of first changeSet is still like before 6 step.


Solution

  • If you're confident that your scripts correctly reflect what should be in the database, run the liquibase:clearCheckSums maven goal, which will clean it all up.