Open virtualdogbert opened 4 years ago
@virtualdogbert I am not able to replicate this. All the md5sum
values are different as expected for me.
Are those md5sums for SQL change or Grails changes, because the md5 for all the grails changes I have are all the same... Actually, if I go back in time some of the MD5SUMs for grails changes are null.
@bobbywarner just coming back to this wondering are you setting the checksum in all of your migrations? in the docs it says:
checkSum
The checksum for the change will be generated automatically, but if you want to override the value that gets hashed you can specify it with the checkSum(String value) method.
But the code does this
@Override
CheckSum generateCheckSum() {
CheckSum.compute checksumString ?: 'Grails Change'
}
So if you're not setting it manually, the check some become "Grails Change" for all Grails migrations, rendering the checksum essential useless for Grails changes.
Task List
Steps to Reproduce
SELECT * FROM tdstm.DATABASECHANGELOG where DESCRIPTION='Grails Change' order by ORDEREXECUTED desc
Expected Behaviour
All the MD5SUM values should be different even for grails changes and should be based off the content of the change script.
Actual Behaviour
All the MD5SUM values are the same for grails changes.
Environment Information
The line of code responsible for this is: https://github.com/grails-plugins/grails-database-migration/blob/master/src/main/groovy/org/grails/plugins/databasemigration/liquibase/GroovyChange.groovy#L179