Can you clear liquibase checksums for a given file only?

Lionel Orellana picture Lionel Orellana · May 27, 2015 · Viewed 20.6k times · Source

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

Answer

Jens picture Jens · May 28, 2015

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.)