summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrewLamb <andrew.a.lamb@est.tech>2019-10-23 12:31:27 +0100
committerAndrew Lamb <andrew.a.lamb@est.tech>2019-10-24 16:39:14 +0000
commit24741fcf6d412b75dd257e12b79dafd5e94935c5 (patch)
tree8474e193498df9e91bd871f82cf14e1b7e0991f9
parent86f62530f1813152efbcc3d61f85e1fa6c943e36 (diff)
Fix for setting attributes in cloud sites on startup
Change-Id: Id766ffd28e75d9d8465a3c04b74b540d08a17b4f Issue-ID: SO-2474 Signed-off-by: AndrewLamb <andrew.a.lamb@est.tech>
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java b/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java
index 354c3d07f7..691ae60afd 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java
@@ -128,8 +128,8 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv
private void migrateCloudIdentity(Collection<CloudIdentity> entities, Connection connection) throws SQLException {
logger.debug("Starting migration for CloudConfig-->IdentityService");
String insert =
- "INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`) "
- + "VALUES (?,?,?,?,?,?,?,?,?,?);";
+ "INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`, `PROJECT_DOMAIN_NAME`, `USER_DOMAIN_NAME`) "
+ + "VALUES (?,?,?,?,?,?,?,?,?,?,?,?);";
try (Statement stmt = connection.createStatement();
PreparedStatement ps = connection.prepareStatement(insert)) {
@@ -157,6 +157,8 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv
? cloudIdentity.getIdentityAuthenticationType().name()
: null);
ps.setString(10, FLYWAY);
+ ps.setString(11, cloudIdentity.getProjectDomainName());
+ ps.setString(12, cloudIdentity.getUserDomainName());
ps.executeUpdate();
}
}