Merge branch 'RED-10197' into 'main'
RED-10197: Migration preparations for RM/DM unification See merge request fforesight/tenant-user-management-service!135
This commit is contained in:
commit
5e3d632846
@ -53,4 +53,6 @@ public class TenantEntity {
|
||||
@Convert(converter = JSONMapConverter.class)
|
||||
@Builder.Default
|
||||
private Map<String, Object> details = new HashMap<>();
|
||||
@Column
|
||||
private String applicationType;
|
||||
}
|
||||
|
||||
@ -111,6 +111,10 @@ public class TenantManagementService implements TenantProvider {
|
||||
@Value("${fforesight.tenant-exchange.name}")
|
||||
private String tenantExchangeName;
|
||||
|
||||
@Value("${FFORESIGHT_TENANT_USER_MANAGEMENT_APPLICATION_NAME:RedactManager}")
|
||||
private String applicationType;
|
||||
|
||||
|
||||
|
||||
@SneakyThrows
|
||||
public TenantResponse createTenant(CreateTenantRequest tenantRequest) {
|
||||
@ -214,6 +218,7 @@ public class TenantManagementService implements TenantProvider {
|
||||
|
||||
log.info("Created default SMTP configuration.");
|
||||
|
||||
tenantEntity.setApplicationType(applicationType);
|
||||
var saved = tenantPersistenceService.save(tenantEntity);
|
||||
|
||||
log.info("Persisted tenant: {}", tenantRequest.getTenantId());
|
||||
|
||||
@ -15,3 +15,5 @@ databaseChangeLog:
|
||||
file: db/changelog/master/8-tenant-connection-data-string-length.changelog.yaml
|
||||
- include:
|
||||
file: db/changelog/master/9-add-mongodb-connection-columns.yaml
|
||||
- include:
|
||||
file: db/changelog/master/10-add-application-type-to-tenant.yaml
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
databaseChangeLog:
|
||||
- property: # this will be used as a default if no environment variable is present
|
||||
name: FFORESIGHT_TENANT_USER_MANAGEMENT_APPLICATION_NAME
|
||||
value: "RedactManager"
|
||||
- changeSet:
|
||||
id: add-application-type-to-tenant
|
||||
author: maverick
|
||||
changes:
|
||||
- addColumn:
|
||||
columns:
|
||||
- column:
|
||||
name: application_type
|
||||
type: VARCHAR(255)
|
||||
tableName: tenant
|
||||
- update:
|
||||
tableName: tenant
|
||||
columns:
|
||||
- column:
|
||||
name: application_type
|
||||
value: ${FFORESIGHT_TENANT_USER_MANAGEMENT_APPLICATION_NAME}
|
||||
Loading…
x
Reference in New Issue
Block a user