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:

3:cf2f5de7a1dcc738bbc185e25fbcf6c9

      

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

3:cf2f5de7a1dcc738bbc185e25fbcf6c9

      

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

3:cedf7a8ba54ea3f83141f7987007deb7

      

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?

+3


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.

+3


source


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?

0


source







All Articles