Merge branch 'feature/RED-9348' into 'main'
RED-9348: Move component log to Mongo See merge request fforesight/mongo-database-commons!15
This commit is contained in:
commit
987e720dad
@ -18,4 +18,5 @@ deploy:
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_COMMIT_BRANCH =~ /^release/
|
||||
- if: $CI_COMMIT_BRANCH =~ /^feature/
|
||||
- if: $CI_COMMIT_TAG
|
||||
@ -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