This is an automated email from the ASF dual-hosted git repository. jamesfredley pushed a commit to branch include-migrations-in-resources in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 054c0472a061e6bf95f8d4f0086a2d2cc60e9c02 Author: James Fredley <[email protected]> AuthorDate: Fri Sep 19 20:25:33 2025 -0400 Update migration plugin resource handling and docs Changed DatabaseMigrationCommand to use only ClassLoaderResourceAccessor, removing FileSystemResourceAccessor for changelog location. Updated upgrade guide to note that adding 'grails-app/migrations' to the main sourceSet is no longer necessary, as it is now handled automatically by the Gradle plugin. --- .../command/DatabaseMigrationCommand.groovy | 5 +---- grails-doc/src/en/guide/upgrading/upgrading60x.adoc | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/grails-data-hibernate5/dbmigration/src/main/groovy/org/grails/plugins/databasemigration/command/DatabaseMigrationCommand.groovy b/grails-data-hibernate5/dbmigration/src/main/groovy/org/grails/plugins/databasemigration/command/DatabaseMigrationCommand.groovy index 9b05c64f23..5d6dea51be 100644 --- a/grails-data-hibernate5/dbmigration/src/main/groovy/org/grails/plugins/databasemigration/command/DatabaseMigrationCommand.groovy +++ b/grails-data-hibernate5/dbmigration/src/main/groovy/org/grails/plugins/databasemigration/command/DatabaseMigrationCommand.groovy @@ -199,10 +199,7 @@ trait DatabaseMigrationCommand { } ResourceAccessor createResourceAccessor() { - new CompositeResourceAccessor( - new FileSystemResourceAccessor(changeLogLocation), - new ClassLoaderResourceAccessor()) - + new ClassLoaderResourceAccessor() } void withDatabase(Map<String, String> dataSourceConfig = null, @ClosureParams(value = SimpleType, options = 'liquibase.database.Database') Closure closure) { diff --git a/grails-doc/src/en/guide/upgrading/upgrading60x.adoc b/grails-doc/src/en/guide/upgrading/upgrading60x.adoc index e24764b15e..df26d4e735 100644 --- a/grails-doc/src/en/guide/upgrading/upgrading60x.adoc +++ b/grails-doc/src/en/guide/upgrading/upgrading60x.adoc @@ -522,3 +522,20 @@ grails { ---- NOTE: Expanded class files & resource files will only be used over the jar file if the plugin applies the gradle plugin `org.apache.grails.gradle.grails-exploded` & the plugin is a subproject of your Gradle build. + +===== 12.22 Database Migration Plugin migrations directory in the main sourceSet + +It is no longer necessary to add the `grails-app/migrations` directory to the `main` sourceSet in order for the Database Migration Plugin to find your changelogs. +This is now done automatically by the `org.apache.grails.gradle.grails-plugin` Gradle plugin. + +[source,groovy] +.build.gradle +---- +sourceSets { + main { + resources { + srcDir 'grails-app/migrations' + } + } +} +---- \ No newline at end of file
