My changeset is written in SQL format. I want to add a valid checksum in changeset as I have changed the existing changeset which already got an entry in dbchangelog table.
When I am adding checksum in changeset ,it generates a new checksum in console and shows a mismatch as it is including the checksum as a part of query to calculate new checksum.
Can you pls help me with correct format and location to add checksum.
–changeset Ravi_XYZ-changes:1 --validCheckSum: 8:098f6bcd4621d373cade4e832627b4f6
alter table Employee add isOnLeave BOOLEAN default false after name;
the validchecksum i have added is the checksum which my console shows with a failure (mismatch checksum) . when i add the newly generated checksum i get the same error with new checksum. let me know if you need any other info.
–changeset Ravi_XYZ-changes:1 --validCheckSum: 8:098f6bcd4621d373cade4e832627b4f6
alter table Employee add isOnLeave BOOLEAN default false after name;
the validchecksum i have added is the checksum which my console shows with a failure (mismatch checksum) . when i add the newly generated checksum i get the same error with new checksum. let me know if you need any other info.
Thanks for the response. I performed some tests with a similar configuration and I think you have the right of it: when the validCheckSum attribute is added to the changeset, it impacts the checksum created for the file on the next run of liquibase so a match can’t be made.
Sure will log an issue, one more general question I have , if we write changeset in SQL format, then we may get into issues when we migrate to some other hetrogenous db? As SQL format is not platform agnostic. Is my understanding correct. What format you recommend for changeset , SQL or xml.
If your plan is to have a single changelog for multiple database platform types it is best to use XML, JSON or YAML. With these types, Liquibase will generate the appropriate SQL at runtime to update the database.
If you are only writing or planning to implement for a single database platform type, you may use the either structured changesets (XML) or plain old SQL to similar effect.
It sounds like you may have plans to switch databases in the future. If that’s the case I’d go with XML.
@ravisharma_raj did you resolve the issue ?
I tried with postgresql when I had updated the file. I added both checksums into sql script as an option and was able to correctly run modified changelog