We have been using liquibase 3.0.8 in our webapp for some time, and database updates are applied by Spring-liquibase bean at application startup. We decided to update our development databases incrementally through 3.1, 3.1.1, 3.2.0 then 3.2.3, at which point updates fail with checksum validation errors. We tried reverting to 3.2.0 but get a different set of checksum errors. I've also tried going straight from 3.0.8 to 3.4.1(current release at time of writing), and get the same checksum errors,
I understand from the liquibase release notes that there was a bug in 3.2.0 which computed incorrect checksums, but I don't have the option of just setting the affected checksums to NULL on production databases, as our webapp is deployed on customer servers that we don't have access to.
Here is an example of a changeset whose checksum fails on updating liquibase to any version later than 3.2.0.
<changeSet author="xxxxx" id="16042015">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="0">select count(*) from Organisation</sqlCheck>
</preConditions>
<comment>Add Organisation table</comment>
<loadData tableName="Organisation" file="sqlUpdates/data/organisations.csv">
<column name="id" type="NUMERIC" />
<column name="title" type="STRING"/>
<column name="approved" type="NUMERIC"/>
</loadData>
Would appreciate any advice here on the best way to deal with this. Here are our current thoughts, all of which have significant drawbacks:
1) We could create a new changeset file, run before any others, containing a changeset that will set all checksums to null before update starts, to stop the error happening in the first place. This is far from ideal, as we no longer can be certain that other statements haven't been really altered.
2) Tell customers to execute some SQL statements to set relevant changeset checksums to null- this is also far from ideal as many of our customers are not proficient at MySQL and may mess something up.
3) Don't update liquibase at all and stick with latest 3.1 release - again, not ideal
Thanks! Richard