Running
liquibase --url=jdbc:oracle:thin:@localhost:1521/XE --
driver=oracle.jdbc.OracleDriver --changeLogFile=db.changelog-next.xml --
username=owner --password=xxxx --logLevel=info clearCheckSums
clears ALL checksums from the database. Is there a way to clear only the checksums for changesets in db.changelog-next.xml.
Thanks
To run the clear-checksums command, specify the database driver, classpath, and URL the Liquibase properties file. For more information, see Specifying Properties in a Connection Profile. You can also specify these properties in your command line.
When running the calculate-checksum command, the DATABASECHANGELOG table calculates an MD5 checksum for each entry based on the SQL script of the changeset. This checksum helps Liquibase detect differences between the changesets you want to deploy and the changesets that have already been run against the database.
In order to detect changes between what is currently in the changelog vs. what was actually run against the database, Liquibase stores a checksum with each changeset entry in the DATABASECHANGELOG tracking table.
I don't think there is another command or a parameter to clearCheckSums
that does this.
But you could do this manually.
All that clearCheckSums
does is nullifying the MD5SUM
column of the databasechangelog
table.
So something like:
update databasechangelog set md5sum=null where filename like '%db.changelog-next.xml';
should work.
(I haven't tested this SQL. It's just an example - so before you apply this to your production database make sure this works on a development db.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With