Compare commits

...

2 Commits

Author SHA1 Message Date
Christoph Schabert
21a8c6e488 Update .gitlab-ci.yml file 2024-09-17 11:17:21 +02:00
maverickstuder
39da0d5de1 RED-9348: Move component log to Mongo
* add dataBaseName as changelog param
2024-09-17 11:15:04 +02:00
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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();
}