Liquibase - Checksum is different from different database vendors

I have a Liquibase checksum problem when I try to run it on MSSQL and MySQL.

In my MSSQL database, I have a modified entry with this checksum:



When I run my Liquibase against this database, it works fine.

Then I will copy the changelog entry to my MySQL database and try to start it and get the following error:

myLiquibase.xml::1::Tobb is now: 3:cedf7a8ba54ea3f83141f79


I tried to set the checksum to null

in my MSSQL to recover the checksum and the checksum goes back to



When you do the same thing in MySQL I get this checksum:



So, from what I can see, depending on whether it runs in MSSQL or MySQL, Liquibase generates a different checksum. How can this happen? I thought the checksum only depends on the actual fluid content - script?


source to share

2 answers

Yes, it depends on the content and type of DB , because the actual checksum does not depend on your text changeset

, but on the sql that is generated for the current DB, which will be slightly different for different DBs.

If you want to avoid checksum echoes, you can use the tag validCheckSum

in changesets.



The checksum is actually calculated based on the normalized version of the changeset text, not SQL and should not be associated with the database type.

Are you running different OS versions for different databases?



All Articles