grails-database-migration icon indicating copy to clipboard operation
grails-database-migration copied to clipboard

Unable to use grailsChange in changelog with liquibase >= 4

Open cgoIT opened this issue 2 years ago • 0 comments

With version 4.1.0 (liquibase version 4.16.0) of this plugin I can't use the grailsChange closure. Using this closure in a changelog leads to the message

As of Liquibase 4.0, cannot set resource accessor on org.grails.plugins.databasemigration.liquibase.GroovyChange. Must add it to the Scope during the startup.

I think this is because of this line https://github.com/grails/grails-database-migration/blob/1987135588b77be87f90f93355e606ad8126f540/src/main/groovy/org/grails/plugins/databasemigration/liquibase/GroovyChange.groovy#L91

Simply removing this line works for me. If this is the desired solution I can provide a PR.

cgoIT avatar Sep 27 '22 06:09 cgoIT