How to clear checksums with maven (quarkus)?

My build is failing because it complains about checksums. This happens quite often while developing.

Unfortunately I couldn’t find out how to clear the checksums. As a workaround I just deleted the tables. But I think there must be a better way e.g. (Maven clearCheckSums)

I am not really sure how to run the command properly, I didnt get it working.

I am using IntelliJ with maven and I have this as a plugin in my pom.xml:

liquibase-maven-plugin

also as a dependency in the pom.xml is:

quarkus-liquibase

What command would I need to execute and where would I do that?

I don’t know anything about Maven, but I would suggest that Liquibase is trying to tell you something important by raising the checksum error, and it’s important to figure that out first. The clear-checksums command really just ignores the actual issue, and the command is very much overused at my organization.

1 Like

actually I am not fully sure how liquibase works :smiley: and how such a thing would happen.

at the moment it seems that when you delete all tables they will be generated again from the xml files.

Some of the xml file generate tables and some files are for putting test values in the tables.

In what scenario would I get an checksum error?

Liquibase inserts a row into the databasechangelog table for every successfully executed changset. That row contains the md5sum that is calculated for the changeset.

If that changeset is then modified (which will change the md5sum), it will be detected by Liquibase and a checksum error will be raised, since a changeset that has already been executed should never be modified.

at the moment the only solution that works while development is that delete all database tables. and then restart the project which will then run the changesets again.

Is that the way to do it?

Such an error would only come when I change the original changeset or also if I would do something on the database tables?

When you say “delete all database tables” that implies that you are also dropping the Liquibase databasechangelog table, which tracks the changesets that have been executed. Since that table is gone all of the changeset will be applied again.