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

Commit ccda452

Browse files
committed
Remove "dataSource_" from bean name as dataSourceName of GroovyChange when using additional dataSources
1 parent cc3c38c commit ccda452

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/groovy/org/grails/plugins/databasemigration/liquibase/GroovyChange.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ class GroovyChange extends AbstractChange {
9191

9292
ctx = parsedNode.getChildValue(null, 'applicationContext', ApplicationContext)
9393
dataSourceName = parsedNode.getChildValue(null, DATA_SOURCE_NAME_KEY, String)
94+
if (dataSourceName.startsWith("dataSource_")) {
95+
dataSourceName = dataSourceName.substring("dataSource_".length())
96+
}
9497
initClosure = parsedNode.getChildValue(null, 'init', Closure)
9598
validateClosure = parsedNode.getChildValue(null, 'validate', Closure)
9699
changeClosure = parsedNode.getChildValue(null, 'change', Closure)

0 commit comments

Comments
 (0)