Migrate from flyway to liquibase 12/143412/1
authorFiete Ostkamp <fiete.ostkamp@telekom.de>
Sun, 1 Mar 2026 16:24:39 +0000 (17:24 +0100)
committerFiete Ostkamp <fiete.ostkamp@telekom.de>
Sun, 1 Mar 2026 16:24:39 +0000 (17:24 +0100)
Issue-ID: SO-4248
Change-Id: I6eac710d803eee03f41a0c959abf0f7c91441817
Signed-off-by: Fiete Ostkamp <fiete.ostkamp@telekom.de>
23 files changed:
adapters/mso-catalog-db-adapter/pom.xml
adapters/mso-catalog-db-adapter/src/main/java/db/migration/CloudConfigMigration.java [moved from adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java with 85% similarity]
adapters/mso-catalog-db-adapter/src/main/resources/application.yaml
adapters/mso-catalog-db-adapter/src/main/resources/db/changelog/db.changelog-master.xml [new file with mode: 0644]
adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/CatalogDbAdapterBaseTest.java
adapters/mso-catalog-db-adapter/src/test/resources/application-test.yaml
adapters/mso-catalog-db-adapter/src/test/resources/db/changelog/db.changelog-test.xml [new file with mode: 0644]
adapters/mso-catalog-db-adapter/src/test/resources/logback-test.xml
adapters/mso-openstack-adapters/src/test/resources/application-nomigrate.yaml
adapters/mso-openstack-adapters/src/test/resources/schema.sql
adapters/mso-requests-db-adapter/pom.xml
adapters/mso-requests-db-adapter/src/main/resources/application.yaml
adapters/mso-requests-db-adapter/src/main/resources/db/changelog/db.changelog-master.xml [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/test/resources/application-test.yaml
adapters/mso-requests-db-adapter/src/test/resources/db/changelog/db.changelog-test.xml [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/test/resources/logback-test.xml
asdc-controller/src/test/resources/schema.sql
common/common/src/test/resources/logback-test.xml
cxf-logging/src/test/resources/logback-test.xml
deployment-configs/src/main/resources/logger/logback-spring.xml
docs/developer_info/Cxf_Logging.rst
mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
mso-catalog-db/src/test/resources/schema.sql

index a129cdf..d3815d6 100644 (file)
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.flywaydb</groupId>
-      <artifactId>flyway-core</artifactId>
+      <groupId>org.liquibase</groupId>
+      <artifactId>liquibase-core</artifactId>
     </dependency>
     <dependency>
       <groupId>io.micrometer</groupId>
@@ -32,8 +32,13 @@ 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 liquibase.change.custom.CustomTaskChange;
+import liquibase.database.Database;
+import liquibase.database.jvm.JdbcConnection;
+import liquibase.exception.CustomChangeException;
+import liquibase.exception.SetupException;
+import liquibase.exception.ValidationErrors;
+import liquibase.resource.ResourceAccessor;
 import org.onap.so.db.catalog.beans.CloudIdentity;
 import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.db.catalog.beans.CloudifyManager;
@@ -49,17 +54,43 @@ import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
  * (application-{profile}.yaml) and persist data (when not already present) to the catalod database.
  */
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class R__CloudConfigMigration extends BaseJavaMigration {
-    private static final Logger logger = LoggerFactory.getLogger(R__CloudConfigMigration.class);
+public class CloudConfigMigration implements CustomTaskChange {
+    private static final Logger logger = LoggerFactory.getLogger(CloudConfigMigration.class);
     private static final ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
-    public static final String FLYWAY = "FLYWAY";
+    public static final String MIGRATION = "MIGRATION";
 
     @JsonProperty("cloud_config")
     private CloudConfig cloudConfig;
 
     @Override
-    public boolean isUndo() {
-        return false;
+    public void execute(Database database) throws CustomChangeException {
+        try {
+            JdbcConnection jdbcConnection = (JdbcConnection) database.getConnection();
+            Connection connection = jdbcConnection.getWrappedConnection();
+            migrate(connection);
+        } catch (Exception e) {
+            throw new CustomChangeException("CloudConfigMigration failed", e);
+        }
+    }
+
+    @Override
+    public String getConfirmationMessage() {
+        return "CloudConfigMigration completed successfully";
+    }
+
+    @Override
+    public void setUp() throws SetupException {
+        // no setup required
+    }
+
+    @Override
+    public void setFileOpener(ResourceAccessor resourceAccessor) {
+        // not used
+    }
+
+    @Override
+    public ValidationErrors validate(Database database) {
+        return new ValidationErrors();
     }
 
     public void migrate(Connection connection) throws Exception {
@@ -81,7 +112,7 @@ public class R__CloudConfigMigration extends BaseJavaMigration {
             logger.debug("No CloudConfig defined in {}", configLocation);
 
             // Try the application.yaml file
-            try (InputStream stream = R__CloudConfigMigration.class.getResourceAsStream(getApplicationYamlName())) {
+            try (InputStream stream = CloudConfigMigration.class.getResourceAsStream(getApplicationYamlName())) {
                 cloudConfiguration = loadCloudConfig(stream);
             }
 
@@ -106,7 +137,7 @@ public class R__CloudConfigMigration extends BaseJavaMigration {
     }
 
     private CloudConfig loadCloudConfig(InputStream stream) throws IOException {
-        R__CloudConfigMigration cloudConfigMigration = mapper.readValue(stream, R__CloudConfigMigration.class);
+        CloudConfigMigration cloudConfigMigration = mapper.readValue(stream, CloudConfigMigration.class);
         CloudConfig cloudConfiguration = cloudConfigMigration.getCloudConfig();
 
         if (cloudConfiguration != null) {
@@ -153,7 +184,7 @@ public class R__CloudConfigMigration extends BaseJavaMigration {
                                 cloudIdentity.getIdentityAuthenticationType() != null
                                         ? cloudIdentity.getIdentityAuthenticationType().name()
                                         : null);
-                        ps.setString(10, FLYWAY);
+                        ps.setString(10, MIGRATION);
                         ps.setString(11, cloudIdentity.getProjectDomainName());
                         ps.setString(12, cloudIdentity.getUserDomainName());
                         ps.executeUpdate();
@@ -187,7 +218,7 @@ public class R__CloudConfigMigration extends BaseJavaMigration {
                         ps.setString(6, cloudSite.getCloudifyId());
                         ps.setString(7, cloudSite.getPlatform());
                         ps.setString(8, cloudSite.getOrchestrator());
-                        ps.setString(9, FLYWAY);
+                        ps.setString(9, MIGRATION);
                         ps.executeUpdate();
                     }
                 }
@@ -216,29 +247,11 @@ public class R__CloudConfigMigration extends BaseJavaMigration {
                         ps.setString(3, cloudifyManager.getUsername());
                         ps.setString(4, cloudifyManager.getPassword());
                         ps.setString(5, cloudifyManager.getVersion());
-                        ps.setString(6, FLYWAY);
+                        ps.setString(6, MIGRATION);
                         ps.executeUpdate();
                     }
                 }
             }
         }
     }
-
-    public MigrationVersion getVersion() {
-        return null;
-    }
-
-    public String getDescription() {
-        return "R_CloudConfigMigration";
-    }
-
-    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());
-
-    }
 }
index ada9dca..47d5db2 100644 (file)
@@ -26,13 +26,11 @@ spring:
        pool-name: catdb-pool
        registerMbeans: true
 
-  flyway:
-    baseline-on-migrate: false
+  liquibase:
+    change-log: classpath:db/changelog/db.changelog-master.xml
     url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
     user: ${DB_ADMIN_USERNAME}
     password: ${DB_ADMIN_PASSWORD}
-    outOfOrder: true
-    validateOnMigrate: false
   jpa:
       show-sql: true
       hibernate:
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/changelog/db.changelog-master.xml b/adapters/mso-catalog-db-adapter/src/main/resources/db/changelog/db.changelog-master.xml
new file mode 100644 (file)
index 0000000..5d1527a
--- /dev/null
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<databaseChangeLog
+    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
+                        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
+
+    <!-- Versioned migrations (migrated from Flyway) -->
+    <changeSet id="V1__Base_version" author="so-migration">
+        <sqlFile path="db/migration/V1__Base_version.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V1.1__Initial_Recipe_Setup" author="so-migration">
+        <sqlFile path="db/migration/V1.1__Initial_Recipe_Setup.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.0.0__Modify_Resource_Relationships" author="so-migration">
+        <sqlFile path="db/migration/V2.0.0__Modify_Resource_Relationships.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.0.1__Modify_Resource_Relationships_Alters" author="so-migration">
+        <sqlFile path="db/migration/V2.0.1__Modify_Resource_Relationships_Alters.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.1__Update_Recipe_For_API_Flag" author="so-migration">
+        <sqlFile path="db/migration/V2.1__Update_Recipe_For_API_Flag.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.2__ONAP_TABLE_CHANGES" author="so-migration">
+        <sqlFile path="db/migration/V2.2__ONAP_TABLE_CHANGES.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.3__MacroTableChanges" author="so-migration">
+        <sqlFile path="db/migration/V2.3__MacroTableChanges.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.4__MacroReferenceData1806" author="so-migration">
+        <sqlFile path="db/migration/V2.4__MacroReferenceData1806.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.5__RainyDayHandlerMacroData" author="so-migration">
+        <sqlFile path="db/migration/V2.5__RainyDayHandlerMacroData.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.6__NorthboundAddTopLevelFlow" author="so-migration">
+        <sqlFile path="db/migration/V2.6__NorthboundAddTopLevelFlow.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.7__VNFCInstanceGroup1806" author="so-migration">
+        <sqlFile path="db/migration/V2.7__VNFCInstanceGroup1806.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.8__OrchestrationStatus_ValidActionStateTransition" author="so-migration">
+        <sqlFile path="db/migration/V2.8__OrchestrationStatus_ValidActionStateTransition.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.9__UpdateIsTopLevelFlowColumn" author="so-migration">
+        <sqlFile path="db/migration/V2.9__UpdateIsTopLevelFlowColumn.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.10__VNFCInstanceGroupChanges" author="so-migration">
+        <sqlFile path="db/migration/V2.10__VNFCInstanceGroupChanges.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.11__Modify_IS_Base_Type" author="so-migration">
+        <sqlFile path="db/migration/V2.11__Modify_IS_Base_Type.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.12__UpdateMacroReferenceData_Homing" author="so-migration">
+        <sqlFile path="db/migration/V2.12__UpdateMacroReferenceData_Homing.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.13__Alter_external_service_to_internal_model_mapping" author="so-migration">
+        <sqlFile path="db/migration/V2.13__Alter_external_service_to_internal_model_mapping.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.14__DeactivateAndCloudDelete" author="so-migration">
+        <sqlFile path="db/migration/V2.14__DeactivateAndCloudDelete.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.15__Orchestration_Status_Valid_Action_State_Transition_Table_Updates" author="so-migration">
+        <sqlFile path="db/migration/V2.15__Orchestration_Status_Valid_Action_State_Transition_Table_Updates.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.16__Remove_Orchestration_Flow_Reference_FK_To_Building_Block_Detail_Pre_New_Solution" author="so-migration">
+        <sqlFile path="db/migration/V2.16__Remove_Orchestration_Flow_Reference_FK_To_Building_Block_Detail_Pre_New_Solution.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.17__DeactivateAndCloudDeleteChanges" author="so-migration">
+        <sqlFile path="db/migration/V2.17__DeactivateAndCloudDeleteChanges.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.18__AlterVNFRecipeVnfTypeColumnName" author="so-migration">
+        <sqlFile path="db/migration/V2.18__AlterVNFRecipeVnfTypeColumnName.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V3.1__AddServiceMacroDeactivateToMacroTables" author="so-migration">
+        <sqlFile path="db/migration/V3.1__AddServiceMacroDeactivateToMacroTables.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V3.2__ChangeMINApiVersionInNorthbound" author="so-migration">
+        <sqlFile path="db/migration/V3.2__ChangeMINApiVersionInNorthbound.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V3.3__ChangeMINApiVersionServiceMacroDeactivate" author="so-migration">
+        <sqlFile path="db/migration/V3.3__ChangeMINApiVersionServiceMacroDeactivate.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V3.4__AddUpdateNetworkALaCarte" author="so-migration">
+        <sqlFile path="db/migration/V3.4__AddUpdateNetworkALaCarte.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V3.5__PointGrApiDefault_To_UpdateVfModuleVolumeInfraV1" author="so-migration">
+        <sqlFile path="db/migration/V3.5__PointGrApiDefault_To_UpdateVfModuleVolumeInfraV1.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V3.6__UpdateNetworkCollectionCatalogDB" author="so-migration">
+        <sqlFile path="db/migration/V3.6__UpdateNetworkCollectionCatalogDB.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V3.7__FixDeactivateNetworkCollection" author="so-migration">
+        <sqlFile path="db/migration/V3.7__FixDeactivateNetworkCollection.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V3.8__UnassignFabricConfigurationData" author="so-migration">
+        <sqlFile path="db/migration/V3.8__UnassignFabricConfigurationData.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V3.9__DropCRModelUUID_FK" author="so-migration">
+        <sqlFile path="db/migration/V3.9__DropCRModelUUID_FK.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.0__AddModelAndModelRecipe" author="so-migration">
+        <sqlFile path="db/migration/V4.0__AddModelAndModelRecipe.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.1__AddCloudConfig" author="so-migration">
+        <sqlFile path="db/migration/V4.1__AddCloudConfig.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.3__ScaleOutRecipe" author="so-migration">
+        <sqlFile path="db/migration/V4.3__ScaleOutRecipe.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.4__AddVnfcTables" author="so-migration">
+        <sqlFile path="db/migration/V4.4__AddVnfcTables.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.6__Remove1802StyleAssignNetwork" author="so-migration">
+        <sqlFile path="db/migration/V4.6__Remove1802StyleAssignNetwork.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.7__CreateTableControllerSelectionRefence" author="so-migration">
+        <sqlFile path="db/migration/V4.7__CreateTableControllerSelectionRefence.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.8__AutoScaleOutReferenceData" author="so-migration">
+        <sqlFile path="db/migration/V4.8__AutoScaleOutReferenceData.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.9__DeleteServiceRecipeOldMacro" author="so-migration">
+        <sqlFile path="db/migration/V4.9__DeleteServiceRecipeOldMacro.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.10__CvnfcCustomizationNullableColumn" author="so-migration">
+        <sqlFile path="db/migration/V4.10__CvnfcCustomizationNullableColumn.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.11__RecreateRecipe" author="so-migration">
+        <sqlFile path="db/migration/V4.11__RecreateRecipe.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.12__add_second_column_to_rainy_day_handler_for_after_retry" author="so-migration">
+        <sqlFile path="db/migration/V4.12__add_second_column_to_rainy_day_handler_for_after_retry.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.12.1__UpdateAutoScaleOutRefData" author="so-migration">
+        <sqlFile path="db/migration/V4.12.1__UpdateAutoScaleOutRefData.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.12.2__AddDomainColumnsCloudIdentity" author="so-migration">
+        <sqlFile path="db/migration/V4.12.2__AddDomainColumnsCloudIdentity.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.13__UpdateBBOrchestrationStatusAutoScaleOut" author="so-migration">
+        <sqlFile path="db/migration/V4.13__UpdateBBOrchestrationStatusAutoScaleOut.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.14__RemoveRetryFromRainyDayHandlingTable" author="so-migration">
+        <sqlFile path="db/migration/V4.14__RemoveRetryFromRainyDayHandlingTable.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.14.2__AddCloudOwnerColumnToNorthBoundRequest" author="so-migration">
+        <sqlFile path="db/migration/V4.14.2__AddCloudOwnerColumnToNorthBoundRequest.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.15__UpdateRainyDayHandlerMacroForScaleOut" author="so-migration">
+        <sqlFile path="db/migration/V4.15__UpdateRainyDayHandlerMacroForScaleOut.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.16__Add_Default_NeutronNetwork" author="so-migration">
+        <sqlFile path="db/migration/V4.16__Add_Default_NeutronNetwork.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.17__UpdateCloudSiteColumn" author="so-migration">
+        <sqlFile path="db/migration/V4.17__UpdateCloudSiteColumn.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.18__ControllerSelectionReferenceData" author="so-migration">
+        <sqlFile path="db/migration/V4.18__ControllerSelectionReferenceData.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.19__RenameCustomToNoValidate" author="so-migration">
+        <sqlFile path="db/migration/V4.19__RenameCustomToNoValidate.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.20__SetActivitiesBBsToNoValidate" author="so-migration">
+        <sqlFile path="db/migration/V4.20__SetActivitiesBBsToNoValidate.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.21__AddHomingTables" author="so-migration">
+        <sqlFile path="db/migration/V4.21__AddHomingTables.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.1__ServiceProxyTableConsolidation" author="so-migration">
+        <sqlFile path="db/migration/V5.1__ServiceProxyTableConsolidation.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.2__AddServiceTypeColumnToNorthBoundRequest" author="so-migration">
+        <sqlFile path="db/migration/V5.2__AddServiceTypeColumnToNorthBoundRequest.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.4__AddPnfResourceAndCustomization" author="so-migration">
+        <sqlFile path="db/migration/V5.4__AddPnfResourceAndCustomization.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.5.1__Correct_Default_NeutronNetwork" author="so-migration">
+        <sqlFile path="db/migration/V5.5.1__Correct_Default_NeutronNetwork.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.6__Fix_CVNFC_Customization" author="so-migration">
+        <sqlFile path="db/migration/V5.6__Fix_CVNFC_Customization.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.6.1__Use_ID_To_Identify_Tables" author="so-migration">
+        <sqlFile path="db/migration/V5.6.1__Use_ID_To_Identify_Tables.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.6.2__AddResourceInput" author="so-migration">
+        <sqlFile path="db/migration/V5.6.2__AddResourceInput.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.6.3__ChangeResourceInputLength" author="so-migration">
+        <sqlFile path="db/migration/V5.6.3__ChangeResourceInputLength.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.6.4__UpdateHeatRelatedAttribute" author="so-migration">
+        <sqlFile path="db/migration/V5.6.4__UpdateHeatRelatedAttribute.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.6.5__AddBluePrintNameVersion" author="so-migration">
+        <sqlFile path="db/migration/V5.6.5__AddBluePrintNameVersion.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.6.6__Add_Column_For_Distrobution_Status" author="so-migration">
+        <sqlFile path="db/migration/V5.6.6__Add_Column_For_Distrobution_Status.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.7__Use_ID_Configuration_Customization" author="so-migration">
+        <sqlFile path="db/migration/V5.7__Use_ID_Configuration_Customization.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.7.1__WorkFlowDesignerTables" author="so-migration">
+        <sqlFile path="db/migration/V5.7.1__WorkFlowDesignerTables.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.7.2__Add_Error_Message_Rainy_Day" author="so-migration">
+        <sqlFile path="db/migration/V5.7.2__Add_Error_Message_Rainy_Day.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.9__AddSkipPostInstantiationConfiguration" author="so-migration">
+        <sqlFile path="db/migration/V5.9__AddSkipPostInstantiationConfiguration.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.10__AlterforWorkFlowDesignerTables" author="so-migration">
+        <sqlFile path="db/migration/V5.10__AlterforWorkFlowDesignerTables.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.10.1__AlterTblActivitySpecToUserParameters" author="so-migration">
+        <sqlFile path="db/migration/V5.10.1__AlterTblActivitySpecToUserParameters.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.11__AddVnfResourceOrder" author="so-migration">
+        <sqlFile path="db/migration/V5.11__AddVnfResourceOrder.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.12__Add_Relation_VnfcCustomization" author="so-migration">
+        <sqlFile path="db/migration/V5.12__Add_Relation_VnfcCustomization.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.0__AddNamingPolicyToService" author="so-migration">
+        <sqlFile path="db/migration/V6.0__AddNamingPolicyToService.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.1.1__AddServiceRoleToRainyDayHandling" author="so-migration">
+        <sqlFile path="db/migration/V6.1.1__AddServiceRoleToRainyDayHandling.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.2__AddNfValidData" author="so-migration">
+        <sqlFile path="db/migration/V6.2__AddNfValidData.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.3__AlterColumnActionCategoryControllerSelectionCategory" author="so-migration">
+        <sqlFile path="db/migration/V6.3__AlterColumnActionCategoryControllerSelectionCategory.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.0__AddActivatedForOrchestrationStatus" author="so-migration">
+        <sqlFile path="db/migration/V7.0__AddActivatedForOrchestrationStatus.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.1__UpdatedCloudSiteTable" author="so-migration">
+        <sqlFile path="db/migration/V7.1__UpdatedCloudSiteTable.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.2__UpdateCloudSiteTableSupportFabric" author="so-migration">
+        <sqlFile path="db/migration/V7.2__UpdateCloudSiteTableSupportFabric.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.3__UpdateVnfcCustResourceInputLength" author="so-migration">
+        <sqlFile path="db/migration/V7.3__UpdateVnfcCustResourceInputLength.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.5__AddServiceArtifact" author="so-migration">
+        <sqlFile path="db/migration/V7.5__AddServiceArtifact.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.5.1__AddServiceArtifact" author="so-migration">
+        <sqlFile path="db/migration/V7.5.1__AddServiceArtifact.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.1__AddControllerActorAndBlueprint" author="so-migration">
+        <sqlFile path="db/migration/V8.1__AddControllerActorAndBlueprint.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.2__AddScopeAndActionColumnsInOrchestrationFlowReference" author="so-migration">
+        <sqlFile path="db/migration/V8.2__AddScopeAndActionColumnsInOrchestrationFlowReference.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.4__AddBBNameSelectionReference" author="so-migration">
+        <sqlFile path="db/migration/V8.4__AddBBNameSelectionReference.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.5__AddCloudOwner" author="so-migration">
+        <sqlFile path="db/migration/V8.5__AddCloudOwner.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.6__Update_Service_Function" author="so-migration">
+        <sqlFile path="db/migration/V8.6__Update_Service_Function.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.7__AddProcessingFlags" author="so-migration">
+        <sqlFile path="db/migration/V8.7__AddProcessingFlags.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.7.1__Update_Optical_Service_Recipe" author="so-migration">
+        <sqlFile path="db/migration/V8.7.1__Update_Optical_Service_Recipe.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.8__AddSoftwareVersionToPnfCustomization" author="so-migration">
+        <sqlFile path="db/migration/V8.8__AddSoftwareVersionToPnfCustomization.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.8.1__AddColumnAdminProjectDomainName" author="so-migration">
+        <sqlFile path="db/migration/V8.8.1__AddColumnAdminProjectDomainName.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.9__EnforceNotNullWithDefaults" author="so-migration">
+        <sqlFile path="db/migration/V8.9__EnforceNotNullWithDefaults.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.9.1__AddBuildingBlockRollback" author="so-migration">
+        <sqlFile path="db/migration/V8.9.1__AddBuildingBlockRollback.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+
+    <!-- Repeatable migrations (runOnChange) -->
+    <changeSet id="R__MacroData" author="so-migration" runOnChange="true">
+        <sqlFile path="db/migration/R__MacroData.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="R__WorkflowDesignerData" author="so-migration" runOnChange="true">
+        <sqlFile path="db/migration/R__WorkflowDesignerData.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+
+    <!-- Cloud config Java migration (converted from Flyway R__CloudConfigMigration) -->
+    <changeSet id="R__CloudConfigMigration" author="so-migration" runOnChange="true">
+        <customChange class="db.migration.CloudConfigMigration"/>
+    </changeSet>
+
+</databaseChangeLog>
index 97ae149..4410b00 100644 (file)
@@ -48,7 +48,7 @@ public class CatalogDbAdapterBaseTest {
     static void configureProperties(DynamicPropertyRegistry registry) {
         int port = SocketUtils.findAvailableTcpPort();
         registry.add("spring.datasource.url", () -> String.format("jdbc:mariadb://localhost:%s/catalogdb", port));
-        registry.add("spring.flyway.url", () -> String.format("jdbc:mariadb://localhost:%s/catalogdb", port));
+        registry.add("spring.liquibase.url", () -> String.format("jdbc:mariadb://localhost:%s/catalogdb", port));
         registry.add("mariaDB4j.port", () -> port);
     }
 }
index 09262f9..bc98ae4 100644 (file)
@@ -1,7 +1,7 @@
 # TEST FILE
 catalog.db.endpoint: http://localhost:${wiremock.server.port}
 
-ssl-enable: false 
+ssl-enable: false
 mso:
   site-name: localDevEnv
   logPath: logs
@@ -20,12 +20,12 @@ spring:
     driver-class-name: org.mariadb.jdbc.Driver
     initialization-mode: always
     data: classpath*:data.sql
-  flyway:
-    baseline-on-migrate: false
+  liquibase:
+    change-log: classpath:db/changelog/db.changelog-test.xml
     url: jdbc:mariadb://localhost:3307/catalogdb
     user: root
     password: password
-  jpa:   
+  jpa:
     generate-ddl: false
     show-sql: false
     hibernate:
@@ -37,7 +37,7 @@ spring:
       ddl-auto: validate
   security:
     usercredentials:
-    -  
+    -
       username: test
       password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
       role: BPEL-Client
@@ -45,15 +45,15 @@ spring:
       username: bpel
       password: '$2a$12$1xyutEZNfjGewIZRfKaE8eZE99f5sYFUmmM80BobI65KNjmcK0JuO'
       role: BPEL-Client
-    -  
+    -
       username: mso_admin
       password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'
-      role: ACTUATOR  
+      role: ACTUATOR
 mariaDB4j:
-  dataDir: 
+  dataDir:
   port: 3307
   databaseName: catalogdb
-  
+
 server:
     port: ${wiremock.server.port}
     tomcat:
@@ -72,7 +72,7 @@ management:
     export:
       prometheus:
         enabled: true # Whether exporting of metrics to Prometheus is enabled.
-        step: 1m # Step size (i.e. reporting frequency) to use.  
+        step: 1m # Step size (i.e. reporting frequency) to use.
 
 cloud_config:
   identity_services:
diff --git a/adapters/mso-catalog-db-adapter/src/test/resources/db/changelog/db.changelog-test.xml b/adapters/mso-catalog-db-adapter/src/test/resources/db/changelog/db.changelog-test.xml
new file mode 100644 (file)
index 0000000..eaaa346
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<databaseChangeLog
+    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
+                        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
+
+    <!-- Include all production migrations -->
+    <include file="db/changelog/db.changelog-master.xml"/>
+
+    <!-- Test data (equivalent to Flyway afterMigrate.sql) -->
+    <changeSet id="test-afterMigrate" author="so-test" runAlways="true">
+        <sqlFile path="db/migration/afterMigrate.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+
+</databaseChangeLog>
index 7c795ee..92fbf90 100644 (file)
@@ -25,7 +25,7 @@
         <appender-ref ref="test" />
     </logger>
 
-    <logger name="org.flywaydb" level="DEBUG" additivity="false">
+    <logger name="liquibase" level="DEBUG" additivity="false">
         <appender-ref ref="STDOUT" />
     </logger>
     <logger name="org.hibernate" level="DEBUG" additivity="false">
     </logger>
 
     <logger name="org.reflections" level="ERROR" />
-    
+
     <root level="WARN">
         <appender-ref ref="STDOUT" />
         <appender-ref ref="test" />
     </root>
 
 
-</configuration>
\ No newline at end of file
+</configuration>
index 2038446..27f3372 100644 (file)
@@ -34,7 +34,7 @@ org:
             delete:
               pollTimeout: 300
               pollInterval: 15
-        tenant: 
+        tenant:
           default_x_aic_orm_client_string: ONAP-SO
           default_keystone_url_version: /v2.0
           default_keystone_reg_ex: "/[vV][0-9]"
@@ -51,12 +51,12 @@ org:
         valet:
           base_url: http://localhost:${wiremock.server.port}
           base_path: /api/valet/placement/v1/
-          valet_auth: 
+          valet_auth:
         po:
           retryCodes: 504
           retryDelay: 5
           retryCount: 3
-      
+
 server-port: 8080
 ssl-enable: false
 tomcat:
@@ -79,35 +79,33 @@ spring:
     jdbc-url: jdbc:mariadb://localhost:3307/catalogdb
     username: root
     password: password
-    driver-class-name: org.mariadb.jdbc.Driver    
+    driver-class-name: org.mariadb.jdbc.Driver
     initialization-mode: always
-  jpa:   
+  jpa:
     generate-ddl: false
     show-sql: false
-    hibernate:      
+    hibernate:
       ddl-auto: none
       naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
       enable-lazy-load-no-trans: true
     database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
-  flyway:
-    baseline-on-migrate: true
-    out-of-order: true
-    ignore-missing-migrations: true
+  liquibase:
+    enabled: false
   security:
     usercredentials:
-    -  
+    -
       username: test
       password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
-      role: MSO-Client        
+      role: MSO-Client
 
 mariaDB4j:
-  dataDir: 
+  dataDir:
   port: 3307
   databaseName: catalogdb
 
 
 #Actuator
-management: 
+management:
   endpoints:
     enabled-by-default: false
   endpoint:
@@ -129,4 +127,4 @@ appc:
       write: APPC-TEST-AMDOCS1-DEV3
       sdnc:
         read: SDNC-LCM-READ
-        write: SDNC-LCM-WRITE
\ No newline at end of file
+        write: SDNC-LCM-WRITE
index 44fbbd9..9318d4d 100644 (file)
@@ -393,25 +393,39 @@ CREATE TABLE `external_service_to_internal_model_mapping` (
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
--- Table structure for table `flyway_schema_history`
+-- Table structure for Liquibase tracking tables
 --
 
-DROP TABLE IF EXISTS `flyway_schema_history`;
+DROP TABLE IF EXISTS `DATABASECHANGELOGLOCK`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
 /*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `flyway_schema_history` (
-  `installed_rank` int(11) NOT NULL,
-  `version` varchar(50) DEFAULT NULL,
-  `description` varchar(200) NOT NULL,
-  `type` varchar(20) NOT NULL,
-  `script` varchar(1000) NOT NULL,
-  `checksum` int(11) DEFAULT NULL,
-  `installed_by` varchar(100) NOT NULL,
-  `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  `execution_time` int(11) NOT NULL,
-  `success` tinyint(1) NOT NULL,
-  PRIMARY KEY (`installed_rank`),
-  KEY `flyway_schema_history_s_idx` (`success`)
+CREATE TABLE `DATABASECHANGELOGLOCK` (
+  `ID` int(11) NOT NULL,
+  `LOCKED` tinyint(1) NOT NULL,
+  `LOCKGRANTED` datetime DEFAULT NULL,
+  `LOCKEDBY` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+DROP TABLE IF EXISTS `DATABASECHANGELOG`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `DATABASECHANGELOG` (
+  `ID` varchar(255) NOT NULL,
+  `AUTHOR` varchar(255) NOT NULL,
+  `FILENAME` varchar(255) NOT NULL,
+  `DATEEXECUTED` datetime NOT NULL,
+  `ORDEREXECUTED` int(11) NOT NULL,
+  `EXECTYPE` varchar(10) NOT NULL,
+  `MD5SUM` varchar(35) DEFAULT NULL,
+  `DESCRIPTION` varchar(255) DEFAULT NULL,
+  `COMMENTS` varchar(255) DEFAULT NULL,
+  `TAG` varchar(255) DEFAULT NULL,
+  `LIQUIBASE` varchar(20) DEFAULT NULL,
+  `CONTEXTS` varchar(255) DEFAULT NULL,
+  `LABELS` varchar(255) DEFAULT NULL,
+  `DEPLOYMENT_ID` varchar(10) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
index 40d1f30..4397d1b 100644 (file)
@@ -70,8 +70,8 @@
       <optional>true</optional>
     </dependency>
     <dependency>
-      <groupId>org.flywaydb</groupId>
-      <artifactId>flyway-core</artifactId>
+      <groupId>org.liquibase</groupId>
+      <artifactId>liquibase-core</artifactId>
       <optional>true</optional>
     </dependency>
     <dependency>
index 13512ba..62abbe9 100644 (file)
@@ -25,9 +25,9 @@ spring:
       driver-class-name: org.mariadb.jdbc.Driver
       pool-name: reqdb-pool
       registerMbeans: true
-  flyway:
-    baseline-on-migrate: false
-    url:  jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
+  liquibase:
+    change-log: classpath:db/changelog/db.changelog-master.xml
+    url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
     user: ${DB_ADMIN_USERNAME}
     password: ${DB_ADMIN_PASSWORD}
   jpa:
diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/changelog/db.changelog-master.xml b/adapters/mso-requests-db-adapter/src/main/resources/db/changelog/db.changelog-master.xml
new file mode 100644 (file)
index 0000000..996667a
--- /dev/null
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<databaseChangeLog
+    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
+                        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
+
+    <!-- Versioned migrations (migrated from Flyway) -->
+    <changeSet id="V1__Base_version" author="so-migration">
+        <sqlFile path="db/migration/V1__Base_version.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.1__Add_Identifiers_Active_Requests" author="so-migration">
+        <sqlFile path="db/migration/V2.1__Add_Identifiers_Active_Requests.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.2__Add_Operation_Status" author="so-migration">
+        <sqlFile path="db/migration/V2.2__Add_Operation_Status.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.3__Remove_Invalid_requestdb_data" author="so-migration">
+        <sqlFile path="db/migration/V2.3__Remove_Invalid_requestdb_data.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.4__Activate_Requests_Nullable_Coulmns" author="so-migration">
+        <sqlFile path="db/migration/V2.4__Activate_Requests_Nullable_Coulmns.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.5__Archived_Infra_Requests" author="so-migration">
+        <sqlFile path="db/migration/V2.5__Archived_Infra_Requests.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.6__shedlock" author="so-migration">
+        <sqlFile path="db/migration/V2.6__shedlock.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V2.7__Update_Status_Message_ColumnTypes" author="so-migration">
+        <sqlFile path="db/migration/V2.7__Update_Status_Message_ColumnTypes.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.2__Add_Request_Processing_Data" author="so-migration">
+        <sqlFile path="db/migration/V4.2__Add_Request_Processing_Data.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.3__Expand_Column_Size" author="so-migration">
+        <sqlFile path="db/migration/V4.3__Expand_Column_Size.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.13__Add_Rollback_Status_Message_To_Infra_Active_Reqests" author="so-migration">
+        <sqlFile path="db/migration/V4.13__Add_Rollback_Status_Message_To_Infra_Active_Reqests.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V4.14__Add_Flow_Status_To_Infra_Active_Requests" author="so-migration">
+        <sqlFile path="db/migration/V4.14__Add_Flow_Status_To_Infra_Active_Requests.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.1__Add_Column_Request_url_varchar500" author="so-migration">
+        <sqlFile path="db/migration/V5.1__Add_Column_Request_url_varchar500.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.2__Add_Instance_Group_Data" author="so-migration">
+        <sqlFile path="db/migration/V5.2__Add_Instance_Group_Data.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.3__Add_Add_Column_To_WatchDog_Model_Id_Lookup" author="so-migration">
+        <sqlFile path="db/migration/V5.3__Add_Add_Column_To_WatchDog_Model_Id_Lookup.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.3.1__Watchdog_Lock_Version_Column" author="so-migration">
+        <sqlFile path="db/migration/V5.3.1__Watchdog_Lock_Version_Column.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.4__Add_Vnf_Operational_Env_Id_column" author="so-migration">
+        <sqlFile path="db/migration/V5.4__Add_Vnf_Operational_Env_Id_column.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.7__Add_OpenStack_Request_Information" author="so-migration">
+        <sqlFile path="db/migration/V5.7__Add_OpenStack_Request_Information.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.8__Add_Column_Original_Request_Id" author="so-migration">
+        <sqlFile path="db/migration/V5.8__Add_Column_Original_Request_Id.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.9__Add_Column_Ext_System_Error_Source" author="so-migration">
+        <sqlFile path="db/migration/V5.9__Add_Column_Ext_System_Error_Source.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V5.10__Add_Column_IS_DATA_INTERNAL" author="so-migration">
+        <sqlFile path="db/migration/V5.10__Add_Column_IS_DATA_INTERNAL.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.1__Add_Column_Rollback_Ext_System_Error_Source" author="so-migration">
+        <sqlFile path="db/migration/V6.1__Add_Column_Rollback_Ext_System_Error_Source.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.1.1__Add_Instance_NFVO_Mapping_Table" author="so-migration">
+        <sqlFile path="db/migration/V6.1.1__Add_Instance_NFVO_Mapping_Table.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.2__Expand_Column_Size_Infra_Active_Requests_Request_Status" author="so-migration">
+        <sqlFile path="db/migration/V6.2__Expand_Column_Size_Infra_Active_Requests_Request_Status.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.3__Expand_Column_Size_Archived_Infra_Active_Requests_Request_Status" author="so-migration">
+        <sqlFile path="db/migration/V6.3__Expand_Column_Size_Archived_Infra_Active_Requests_Request_Status.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.4__Add_Indexes_to_Infra_Active_Requests_Table" author="so-migration">
+        <sqlFile path="db/migration/V6.4__Add_Indexes_to_Infra_Active_Requests_Table.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.4.1__Rename_Infra_active_requests_AIC_CLOUD_REGION_Column" author="so-migration">
+        <sqlFile path="db/migration/V6.4.1__Rename_Infra_active_requests_AIC_CLOUD_REGION_Column.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.5__Drop_Table_Active_Requests" author="so-migration">
+        <sqlFile path="db/migration/V6.5__Drop_Table_Active_Requests.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V6.6__UpdateRequestProcessingData" author="so-migration">
+        <sqlFile path="db/migration/V6.6__UpdateRequestProcessingData.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.1__Drop_Columns_from_Infra_requests_archive_tables" author="so-migration">
+        <sqlFile path="db/migration/V7.1__Drop_Columns_from_Infra_requests_archive_tables.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.2__Add_PNF_Column_Infra_Requests_archive_tables" author="so-migration">
+        <sqlFile path="db/migration/V7.2__Add_PNF_Column_Infra_Requests_archive_tables.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.2.1__Add_PNF_Column_Infra_Requests_archive_tables" author="so-migration">
+        <sqlFile path="db/migration/V7.2.1__Add_PNF_Column_Infra_Requests_archive_tables.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.3__Add_Columns_Tenant_Name_Product_Family_Name" author="so-migration">
+        <sqlFile path="db/migration/V7.3__Add_Columns_Tenant_Name_Product_Family_Name.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V7.3.1__AddResourceStatusMessageColumn" author="so-migration">
+        <sqlFile path="db/migration/V7.3.1__AddResourceStatusMessageColumn.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.1__Add_Orchestration_Task_Table" author="so-migration">
+        <sqlFile path="db/migration/V8.1__Add_Orchestration_Task_Table.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.2__Fix_Invalid_Request_Status" author="so-migration">
+        <sqlFile path="db/migration/V8.2__Fix_Invalid_Request_Status.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+    <changeSet id="V8.3__Add_Columns_Workflow_Name_Operation_Name" author="so-migration">
+        <sqlFile path="db/migration/V8.3__Add_Columns_Workflow_Name_Operation_Name.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+
+</databaseChangeLog>
index 522e6bb..2071755 100644 (file)
@@ -25,15 +25,15 @@ spring:
     driver-class-name: org.mariadb.jdbc.Driver\r
     initialize: true\r
     initialization-mode: never\r
-  flyway:\r
-    baseline-on-migrate: false\r
+  liquibase:\r
+    change-log: classpath:db/changelog/db.changelog-test.xml\r
     url: jdbc:mariadb://localhost:3307/requestdb\r
     user: root\r
     password: password\r
-  jpa:   \r
+  jpa:\r
     generate-ddl: false\r
     show-sql: false\r
-    hibernate:      \r
+    hibernate:\r
       ddl-auto: validate\r
       naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy\r
       enable-lazy-load-no-trans: true\r
@@ -44,12 +44,12 @@ spring:
       username: bpel\r
       password: '$2a$12$1xyutEZNfjGewIZRfKaE8eZE99f5sYFUmmM80BobI65KNjmcK0JuO'\r
       role: BPEL-Client\r
-    -  \r
+    -\r
       username: mso_admin\r
       password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'\r
       role: ACTUATOR\r
 mariaDB4j:\r
-  dataDir: \r
+  dataDir:\r
   port: 3307\r
   databaseName: requestdb\r
 \r
@@ -65,4 +65,4 @@ management:
     export:\r
       prometheus:\r
         enabled: true # Whether exporting of metrics to Prometheus is enabled.\r
-        step: 1m # Step size (i.e. reporting frequency) to use.  
\ No newline at end of file
+        step: 1m # Step size (i.e. reporting frequency) to use.\r
diff --git a/adapters/mso-requests-db-adapter/src/test/resources/db/changelog/db.changelog-test.xml b/adapters/mso-requests-db-adapter/src/test/resources/db/changelog/db.changelog-test.xml
new file mode 100644 (file)
index 0000000..eaaa346
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<databaseChangeLog
+    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
+                        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
+
+    <!-- Include all production migrations -->
+    <include file="db/changelog/db.changelog-master.xml"/>
+
+    <!-- Test data (equivalent to Flyway afterMigrate.sql) -->
+    <changeSet id="test-afterMigrate" author="so-test" runAlways="true">
+        <sqlFile path="db/migration/afterMigrate.sql" relativeToChangelogFile="false"/>
+    </changeSet>
+
+</databaseChangeLog>
index c676d7f..cdeb78b 100644 (file)
@@ -25,7 +25,7 @@
         <appender-ref ref="test" />
     </logger>
 
-    <logger name="org.flywaydb" level="DEBUG" additivity="false">
+    <logger name="liquibase" level="DEBUG" additivity="false">
         <appender-ref ref="STDOUT" />
     </logger>
 
@@ -45,4 +45,4 @@
         <appender-ref ref="test" />
     </root>
 
-</configuration>
\ No newline at end of file
+</configuration>
index 83be71e..5b6e39a 100644 (file)
@@ -396,25 +396,39 @@ CREATE TABLE `external_service_to_internal_model_mapping` (
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
--- Table structure for table `flyway_schema_history`
+-- Table structure for Liquibase tracking tables
 --
 
-DROP TABLE IF EXISTS `flyway_schema_history`;
+DROP TABLE IF EXISTS `DATABASECHANGELOGLOCK`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
 /*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `flyway_schema_history` (
-  `installed_rank` int(11) NOT NULL,
-  `version` varchar(50) DEFAULT NULL,
-  `description` varchar(200) NOT NULL,
-  `type` varchar(20) NOT NULL,
-  `script` varchar(1000) NOT NULL,
-  `checksum` int(11) DEFAULT NULL,
-  `installed_by` varchar(100) NOT NULL,
-  `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  `execution_time` int(11) NOT NULL,
-  `success` tinyint(1) NOT NULL,
-  PRIMARY KEY (`installed_rank`),
-  KEY `flyway_schema_history_s_idx` (`success`)
+CREATE TABLE `DATABASECHANGELOGLOCK` (
+  `ID` int(11) NOT NULL,
+  `LOCKED` tinyint(1) NOT NULL,
+  `LOCKGRANTED` datetime DEFAULT NULL,
+  `LOCKEDBY` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+DROP TABLE IF EXISTS `DATABASECHANGELOG`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `DATABASECHANGELOG` (
+  `ID` varchar(255) NOT NULL,
+  `AUTHOR` varchar(255) NOT NULL,
+  `FILENAME` varchar(255) NOT NULL,
+  `DATEEXECUTED` datetime NOT NULL,
+  `ORDEREXECUTED` int(11) NOT NULL,
+  `EXECTYPE` varchar(10) NOT NULL,
+  `MD5SUM` varchar(35) DEFAULT NULL,
+  `DESCRIPTION` varchar(255) DEFAULT NULL,
+  `COMMENTS` varchar(255) DEFAULT NULL,
+  `TAG` varchar(255) DEFAULT NULL,
+  `LIQUIBASE` varchar(20) DEFAULT NULL,
+  `CONTEXTS` varchar(255) DEFAULT NULL,
+  `LABELS` varchar(255) DEFAULT NULL,
+  `DEPLOYMENT_ID` varchar(10) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
@@ -1214,7 +1228,7 @@ CREATE TABLE IF NOT EXISTS `pnf_resource_customization` (
 CREATE TABLE IF NOT EXISTS `pnf_resource_customization_to_service` (
   `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
   `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
-  PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)  
+  PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
 )ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
 
@@ -1535,7 +1549,7 @@ CREATE TABLE `archived_infra_requests` (
   `CONFIGURATION_NAME` varchar(200) DEFAULT NULL,
   `OPERATIONAL_ENV_ID` varchar(45) DEFAULT NULL,
   `OPERATIONAL_ENV_NAME` varchar(200) DEFAULT NULL,
-  `REQUEST_URL` varchar(500) DEFAULT NULL,  
+  `REQUEST_URL` varchar(500) DEFAULT NULL,
   PRIMARY KEY (`REQUEST_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
@@ -1569,7 +1583,7 @@ CREATE TABLE `watchdog_service_mod_ver_id_lookup` (
   `DISTRIBUTION_ID` varchar(45) NOT NULL,
   `SERVICE_MODEL_VERSION_ID` varchar(45) NOT NULL,
   `DISTRIBUTION_NOTIFICATION` LONGTEXT NULL,
-  `CONSUMER_ID` varchar(200) NULL,  
+  `CONSUMER_ID` varchar(200) NULL,
   `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
   `MODIFY_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
   PRIMARY KEY (`DISTRIBUTION_ID`,`SERVICE_MODEL_VERSION_ID`)
@@ -1585,7 +1599,7 @@ CREATE TABLE `activate_operational_env_service_model_distribution_status` (
   `WORKLOAD_CONTEXT` varchar(80) NOT NULL,
   `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
   `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
-  `VNF_OPERATIONAL_ENV_ID` varchar(45) NOT NULL,  
+  `VNF_OPERATIONAL_ENV_ID` varchar(45) NOT NULL,
   PRIMARY KEY (`OPERATIONAL_ENV_ID`,`SERVICE_MODEL_VERSION_ID`,`REQUEST_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
@@ -1617,7 +1631,7 @@ create table operation_status (
   FINISHED_AT datetime NOT NULL,
   primary key (SERVICE_ID,OPERATION_ID)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-    
+
 create table resource_operation_status (
   SERVICE_ID varchar(255) not null,
   OPERATION_ID varchar(255) not null,
@@ -1661,7 +1675,3 @@ create table if not exists model (
        CONSTRAINT uk1_model UNIQUE (`MODEL_TYPE`, `MODEL_VERSION_ID`),
        FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
-
-
-
index a039f5e..f316885 100644 (file)
@@ -56,7 +56,7 @@
     <appender-ref ref="test" />
   </logger>
 
-  <logger name="org.flywaydb" level="DEBUG" additivity="false">
+  <logger name="liquibase" level="DEBUG" additivity="false">
     <appender-ref ref="STDOUT" />
   </logger>
 
index 28dd35f..9af33e1 100644 (file)
@@ -7,9 +7,9 @@
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
-  
+
        http://www.apache.org/licenses/LICENSE-2.0
-  
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
                <appender-ref ref="STDOUT" />
                <appender-ref ref="test" />
        </logger>
-       
-       <logger name="org.flywaydb" level="DEBUG" additivity="false">
+
+       <logger name="liquibase" level="DEBUG" additivity="false">
         <appender-ref ref="STDOUT" />
     </logger>
-       
+
 
        <logger name="ch.vorburger" level="WARN" additivity="false">
                <appender-ref ref="STDOUT" />
        </logger>
-       
+
     <logger name="org.reflections" level="ERROR" />
 
        <root level="WARN">
@@ -73,4 +73,4 @@
        </root>
 
 
-</configuration>
\ No newline at end of file
+</configuration>
index a126930..eac5ff0 100644 (file)
                name="org.camunda.bpm.engine.impl.persistence.entity.JobEntity.level"
                level="${LOG_LEVEL:-DEBUG}" />
 
-       <logger name="org.flywaydb" level="${LOG_LEVEL:-DEBUG}"/>
+       <logger name="liquibase" level="${LOG_LEVEL:-DEBUG}"/>
        <logger name="org.apache.wire" level="${LOG_LEVEL:-DEBUG}" />
        <logger name="org.onap" level="${LOG_LEVEL:-DEBUG}" />
        <logger name="org.apache.cxf.interceptor" level="${LOG_LEVEL:-DEBUG}" />
index ea2bbf5..968e7b5 100644 (file)
@@ -27,7 +27,7 @@ mso-infrastructure-bpmn.
 
 cxf-logging dependency for using in other components:
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
-  
+
   <dependency>
       <groupId>org.onap.so</groupId>
       <artifactId>cxf-logging</artifactId>
@@ -38,9 +38,9 @@ cxf-logging dependency for using in other components:
 pom.xml:
 +++++++++
 <?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <parent>
@@ -189,8 +189,8 @@ Here we can do configure the logger properties for the cxf-logging.
                <appender-ref ref="test" />
 
        </logger>
-       
-       <logger name="org.flywaydb" level="DEBUG" additivity="false">
+
+       <logger name="liquibase" level="DEBUG" additivity="false">
         <appender-ref ref="STDOUT" />
 
     </logger>
@@ -207,4 +207,3 @@ Here we can do configure the logger properties for the cxf-logging.
        </root>
 
 </configuration>
-
index e0ec216..f6a7276 100644 (file)
@@ -396,25 +396,39 @@ CREATE TABLE `external_service_to_internal_model_mapping` (
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
--- Table structure for table `flyway_schema_history`
+-- Table structure for Liquibase tracking tables
 --
 
-DROP TABLE IF EXISTS `flyway_schema_history`;
+DROP TABLE IF EXISTS `DATABASECHANGELOGLOCK`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
 /*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `flyway_schema_history` (
-  `installed_rank` int(11) NOT NULL,
-  `version` varchar(50) DEFAULT NULL,
-  `description` varchar(200) NOT NULL,
-  `type` varchar(20) NOT NULL,
-  `script` varchar(1000) NOT NULL,
-  `checksum` int(11) DEFAULT NULL,
-  `installed_by` varchar(100) NOT NULL,
-  `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  `execution_time` int(11) NOT NULL,
-  `success` tinyint(1) NOT NULL,
-  PRIMARY KEY (`installed_rank`),
-  KEY `flyway_schema_history_s_idx` (`success`)
+CREATE TABLE `DATABASECHANGELOGLOCK` (
+  `ID` int(11) NOT NULL,
+  `LOCKED` tinyint(1) NOT NULL,
+  `LOCKGRANTED` datetime DEFAULT NULL,
+  `LOCKEDBY` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+DROP TABLE IF EXISTS `DATABASECHANGELOG`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `DATABASECHANGELOG` (
+  `ID` varchar(255) NOT NULL,
+  `AUTHOR` varchar(255) NOT NULL,
+  `FILENAME` varchar(255) NOT NULL,
+  `DATEEXECUTED` datetime NOT NULL,
+  `ORDEREXECUTED` int(11) NOT NULL,
+  `EXECTYPE` varchar(10) NOT NULL,
+  `MD5SUM` varchar(35) DEFAULT NULL,
+  `DESCRIPTION` varchar(255) DEFAULT NULL,
+  `COMMENTS` varchar(255) DEFAULT NULL,
+  `TAG` varchar(255) DEFAULT NULL,
+  `LIQUIBASE` varchar(20) DEFAULT NULL,
+  `CONTEXTS` varchar(255) DEFAULT NULL,
+  `LABELS` varchar(255) DEFAULT NULL,
+  `DEPLOYMENT_ID` varchar(10) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
@@ -1345,7 +1359,7 @@ CREATE TABLE `archived_infra_requests` (
   `CONFIGURATION_NAME` varchar(200) DEFAULT NULL,
   `OPERATIONAL_ENV_ID` varchar(45) DEFAULT NULL,
   `OPERATIONAL_ENV_NAME` varchar(200) DEFAULT NULL,
-  `REQUEST_URL` varchar(500) DEFAULT NULL,  
+  `REQUEST_URL` varchar(500) DEFAULT NULL,
   `RESOURCE_STATUS_MESSAGE` longtext,
   PRIMARY KEY (`REQUEST_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@@ -1394,7 +1408,7 @@ CREATE TABLE `activate_operational_env_service_model_distribution_status` (
   `WORKLOAD_CONTEXT` varchar(80) NOT NULL,
   `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
   `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
-  `VNF_OPERATIONAL_ENV_ID` varchar(45) NOT NULL,  
+  `VNF_OPERATIONAL_ENV_ID` varchar(45) NOT NULL,
   PRIMARY KEY (`OPERATIONAL_ENV_ID`,`SERVICE_MODEL_VERSION_ID`,`REQUEST_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
@@ -1426,7 +1440,7 @@ create table operation_status (
   FINISHED_AT datetime NOT NULL,
   primary key (SERVICE_ID,OPERATION_ID)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-    
+
 create table resource_operation_status (
   SERVICE_ID varchar(255) not null,
   OPERATION_ID varchar(255) not null,
index cf1b188..5320677 100644 (file)
@@ -395,25 +395,39 @@ CREATE TABLE `external_service_to_internal_model_mapping` (
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
--- Table structure for table `flyway_schema_history`
+-- Table structure for Liquibase tracking tables
 --
 
-DROP TABLE IF EXISTS `flyway_schema_history`;
+DROP TABLE IF EXISTS `DATABASECHANGELOGLOCK`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
 /*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `flyway_schema_history` (
-  `installed_rank` int(11) NOT NULL,
-  `version` varchar(50) DEFAULT NULL,
-  `description` varchar(200) NOT NULL,
-  `type` varchar(20) NOT NULL,
-  `script` varchar(1000) NOT NULL,
-  `checksum` int(11) DEFAULT NULL,
-  `installed_by` varchar(100) NOT NULL,
-  `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  `execution_time` int(11) NOT NULL,
-  `success` tinyint(1) NOT NULL,
-  PRIMARY KEY (`installed_rank`),
-  KEY `flyway_schema_history_s_idx` (`success`)
+CREATE TABLE `DATABASECHANGELOGLOCK` (
+  `ID` int(11) NOT NULL,
+  `LOCKED` tinyint(1) NOT NULL,
+  `LOCKGRANTED` datetime DEFAULT NULL,
+  `LOCKEDBY` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+DROP TABLE IF EXISTS `DATABASECHANGELOG`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `DATABASECHANGELOG` (
+  `ID` varchar(255) NOT NULL,
+  `AUTHOR` varchar(255) NOT NULL,
+  `FILENAME` varchar(255) NOT NULL,
+  `DATEEXECUTED` datetime NOT NULL,
+  `ORDEREXECUTED` int(11) NOT NULL,
+  `EXECTYPE` varchar(10) NOT NULL,
+  `MD5SUM` varchar(35) DEFAULT NULL,
+  `DESCRIPTION` varchar(255) DEFAULT NULL,
+  `COMMENTS` varchar(255) DEFAULT NULL,
+  `TAG` varchar(255) DEFAULT NULL,
+  `LIQUIBASE` varchar(20) DEFAULT NULL,
+  `CONTEXTS` varchar(255) DEFAULT NULL,
+  `LABELS` varchar(255) DEFAULT NULL,
+  `DEPLOYMENT_ID` varchar(10) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
@@ -1411,7 +1425,7 @@ CREATE TABLE IF NOT EXISTS `processing_flags` (
   `ENDPOINT` varchar(200) NOT NULL,
   `DESCRIPTION` longtext NOT NULL,
   `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
-  `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),  
+  `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
   PRIMARY KEY (`ID`),
   UNIQUE KEY `UK_processing_flags` (`FLAG`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;