|
|
@ -33,16 +33,16 @@ import org.springframework.boot.jdbc.SchemaManagementProvider;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class LiquibaseSchemaManagementProvider implements SchemaManagementProvider {
|
|
|
|
class LiquibaseSchemaManagementProvider implements SchemaManagementProvider {
|
|
|
|
|
|
|
|
|
|
|
|
private final List<SpringLiquibase> liquibases;
|
|
|
|
private final List<SpringLiquibase> liquibaseInstances;
|
|
|
|
|
|
|
|
|
|
|
|
LiquibaseSchemaManagementProvider(List<SpringLiquibase> liquibases) {
|
|
|
|
LiquibaseSchemaManagementProvider(List<SpringLiquibase> liquibases) {
|
|
|
|
this.liquibases = liquibases;
|
|
|
|
this.liquibaseInstances = liquibases;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public SchemaManagement getSchemaManagement(DataSource dataSource) {
|
|
|
|
public SchemaManagement getSchemaManagement(DataSource dataSource) {
|
|
|
|
for (SpringLiquibase liquibase : this.liquibases) {
|
|
|
|
for (SpringLiquibase liquibaseInstance : this.liquibaseInstances) {
|
|
|
|
if (dataSource.equals(liquibase.getDataSource())) {
|
|
|
|
if (dataSource.equals(liquibaseInstance.getDataSource())) {
|
|
|
|
return SchemaManagement.MANAGED;
|
|
|
|
return SchemaManagement.MANAGED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|