From d5968f56b382c50dfafc3b6feeccf5b81d176b9d Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Fri, 5 Feb 2021 20:34:11 -0500 Subject: 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) Change-Id: Ic65b04772b91dd989e41d6b6b93872978bc4e4e2 --- .../java/db/migration/R__CloudConfigMigration.java | 33 ++++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'adapters/mso-catalog-db-adapter/src') 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()); + + } } -- cgit 1.2.3-korg