If I understand you correctly, you want to execute the same scripts on both databases.
This cannot be done using the above config.
The list of databases, is the list of all used databases. The first one is the default one. If you want to execute a script on the second database you have to name your script as follows 02_@autotest2_users.sql
If you want to do the same scripts on all databases, you will have to invoke dbmaintain 2 times.
brgds,
Tim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I used dbmaintain maven plugin to apply sql to multi-databases, only first database changed. pom list bellow:
<scriptLocations>deltas</scriptLocations>
<scriptFileExtensions>sql</scriptFileExtensions>
<autoCreateDbMaintainScriptsTable>true</autoCreateDbMaintainScriptsTable>
<scriptEncoding>UTF-8</scriptEncoding>
<allowOutOfSequenceExecutionOfPatches>true</allowOutOfSequenceExecutionOfPatches>
<databases>
<database>
<name>autotest1</name>
<driverClassName>org.postgresql.Driver</driverClassName>
<userName>xxx</userName>
<password>xxx</password>
<url>jdbc:postgresql://a/data?useUnicode=true&characterEncoding=utf8</url>
<schemaNames>public</schemaNames>
</database>
<database>
<name>autotest2</name>
<driverClassName>org.postgresql.Driver</driverClassName>
<userName>xxx</userName>
<password>xxx</password>
<url>jdbc:postgresql://b/data?useUnicode=true&characterEncoding=utf8</url>
<schemaNames>public</schemaNames>
</database>
</databases>
</configuration>
If I understand you correctly, you want to execute the same scripts on both databases.
This cannot be done using the above config.
The list of databases, is the list of all used databases. The first one is the default one. If you want to execute a script on the second database you have to name your script as follows 02_@autotest2_users.sql
If you want to do the same scripts on all databases, you will have to invoke dbmaintain 2 times.
brgds,
Tim