aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@att.com>2021-02-05 20:34:11 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2021-02-16 15:45:44 -0500
commitd5968f56b382c50dfafc3b6feeccf5b81d176b9d (patch)
treefb84f73c534afa746fb4eaefb247c0c096b8b7a3 /adapters/mso-catalog-db-adapter
parent666b56c9241c37b22f631fb88f4a40aedefa2eac (diff)
update camunda and spring to latest versions
Updated camunda to 7.14 and updated spring boot camunda to 3.4 Started to clean up duplicate maven dependencies Issue-ID: SO-3521 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: Ic65b04772b91dd989e41d6b6b93872978bc4e4e2
Diffstat (limited to 'adapters/mso-catalog-db-adapter')
-rw-r--r--adapters/mso-catalog-db-adapter/pom.xml2
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java33
2 files changed, 19 insertions, 16 deletions
diff --git a/adapters/mso-catalog-db-adapter/pom.xml b/adapters/mso-catalog-db-adapter/pom.xml
index 9b51e35c57..05d85c20a9 100644
--- a/adapters/mso-catalog-db-adapter/pom.xml
+++ b/adapters/mso-catalog-db-adapter/pom.xml
@@ -185,7 +185,7 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
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 691ae60afd..86cfa6ee0c 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
@@ -22,19 +22,6 @@
package db.migration;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
-import org.flywaydb.core.api.MigrationVersion;
-import org.flywaydb.core.api.migration.MigrationChecksumProvider;
-import org.flywaydb.core.api.migration.MigrationInfoProvider;
-import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
-import org.onap.so.db.catalog.beans.CloudIdentity;
-import org.onap.so.db.catalog.beans.CloudSite;
-import org.onap.so.db.catalog.beans.CloudifyManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -45,13 +32,24 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Collection;
+import org.flywaydb.core.api.MigrationVersion;
+import org.flywaydb.core.api.migration.BaseJavaMigration;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.CloudifyManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
/**
* Performs migration using JDBC Connection from the cloud config provided in the environment
* (application-{profile}.yaml) and persist data (when not already present) to the catalod database.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
-public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProvider, MigrationChecksumProvider {
+public class R__CloudConfigMigration extends BaseJavaMigration {
public static final String FLYWAY = "FLYWAY";
private static final Logger logger = LoggerFactory.getLogger(R__CloudConfigMigration.class);
@@ -63,7 +61,6 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv
return false;
}
- @Override
public void migrate(Connection connection) throws Exception {
logger.debug("Starting migration for CloudConfig");
@@ -238,5 +235,11 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv
public Integer getChecksum() {
return Math.toIntExact(System.currentTimeMillis() / 1000);
}
+
+ @Override
+ public void migrate(org.flywaydb.core.api.migration.Context context) throws Exception {
+ migrate(context.getConnection());
+
+ }
}