I have run into an issue with liquibase. So , I made a mistake in my sql commands in one of the changesets. Now whenever I try to upgrade my deployment , the upgrade is failing due to wrong checksum. So I thought of doing the validCheckSum : ANY workaround and have run into this issue where it is not working. So my question is , is there any mistake in my syntax and How do I bypass the checksum check or what is the proper syntax for setting any in liquibase formatted sql.
This is what I have tried
--changeset darth: build-1.3 --validCheckSum: build-1.3:ANY
and it doesnt work.
Please help! Thanks!
Advertisement
Answer
The docs say:
Special value “1:any” will match to any checksum
Not sure why did you put “build-1.3:ANY”?
Also what you can do is:
- Execute your code with latest liquibase changes onto an empty database
- In
DATABASECHANGELOG
table look for the rows with changeset ids that you have been changing - Copy the
MD5SUM
value and paste it into your changeSet definition as a value ofvalidCheckSum
It should run on any database with already executed changesets without errors.
It is worth mentioning that altering a change set is not recommended: by setting a validCheckSum
value you will have “old” changeset already executed and “new” changes to this change set will be skiped. On an empty database your “new” changeset will be executed, so you will potentially have model inconsistencies.