RED-9348: Move component log to Mongo
* add dataBaseName as changelog param
This commit is contained in:
parent
0b57648740
commit
39da0d5de1
@ -1,6 +1,8 @@
|
||||
package com.knecon.fforesight.mongo.database.commons.liquibase;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
|
||||
@ -96,6 +98,12 @@ public class TenantMongoLiquibaseExecutor implements InitializingBean, ResourceL
|
||||
liquibase.setChangeLog(tenantMongoLiquibaseProperties.getChangeLog());
|
||||
liquibase.setContexts(tenantMongoLiquibaseProperties.getContexts());
|
||||
liquibase.setClearCheckSums(tenantMongoLiquibaseProperties.isClearChecksums());
|
||||
|
||||
String databaseName = database.getConnection().getCatalog(); // or getDatabaseName() depending on your implementation
|
||||
Map<String, String> changeLogParameters = new HashMap<>();
|
||||
changeLogParameters.put("databaseName", databaseName);
|
||||
liquibase.setChangeLogParameters(changeLogParameters);
|
||||
|
||||
liquibase.afterPropertiesSet();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user