Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 280fe49

Browse files
nobeansjdaugherty
authored andcommitted
Remove "dataSource_" from bean name as dataSourceName of GroovyChange when using additional dataSources
1 parent b39e53a commit 280fe49

File tree

1 file changed

+3
-0
lines changed
  • grails-database-migration/src/main/groovy/org/grails/plugins/databasemigration/liquibase

1 file changed

+3
-0
lines changed

grails-database-migration/src/main/groovy/org/grails/plugins/databasemigration/liquibase/GroovyChange.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ class GroovyChange extends AbstractChange {
9090
void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException {
9191
ctx = parsedNode.getChildValue(null, 'applicationContext', ApplicationContext)
9292
dataSourceName = parsedNode.getChildValue(null, DATA_SOURCE_NAME_KEY, String)
93+
if (dataSourceName.startsWith("dataSource_")) {
94+
dataSourceName = dataSourceName.substring("dataSource_".length())
95+
}
9396

9497
initClosure = parsedNode.getChildValue(null, 'init', Closure)
9598
initClosure?.setResolveStrategy(Closure.DELEGATE_FIRST)

0 commit comments

Comments
 (0)