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

Commit dadc5d5

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

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
@@ -92,6 +92,9 @@ class GroovyChange extends AbstractChange {
9292

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

0 commit comments

Comments
 (0)