aboutsummaryrefslogtreecommitdiffstats
path: root/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files
diff options
context:
space:
mode:
Diffstat (limited to 'packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files')
-rw-r--r--packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_add_constraints.sql45
-rw-r--r--packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql19
-rw-r--r--packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalogdb/V2.10__UpdateNorthboundRequestToUseInstance.sql24
-rw-r--r--packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalogdb/V3.0__UpdateOrchFlowTableWithATTFlows.sql16
-rw-r--r--packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql1
5 files changed, 40 insertions, 65 deletions
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_add_constraints.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_add_constraints.sql
deleted file mode 100644
index a5e9834de2..0000000000
--- a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_add_constraints.sql
+++ /dev/null
@@ -1,45 +0,0 @@
-USE `mso_catalog`;
-
-ALTER TABLE `mso_catalog`.`service_to_allotted_resources`
- ADD INDEX `fk_service_to_allotted_resources__service_model_uuid_idx` (`SERVICE_MODEL_UUID` ASC),
- ADD INDEX `fk_service_to_allotted_resources__allotted_resource_customiz_idx` (`AR_MODEL_CUSTOMIZATION_UUID` ASC),
- ADD CONSTRAINT `fk_service_to_allotted_resources__service__service_name_ver_id`
- FOREIGN KEY (`SERVICE_MODEL_UUID`)
- REFERENCES `mso_catalog`.`service` (`SERVICE_NAME_VERSION_ID`)
- ON DELETE CASCADE
- ON UPDATE CASCADE,
- ADD CONSTRAINT `fk_service_to_allotted_resources__allotted_resource_customizat1`
- FOREIGN KEY (`AR_MODEL_CUSTOMIZATION_UUID`)
- REFERENCES `mso_catalog`.`allotted_resource_customization` (`MODEL_CUSTOMIZATION_UUID`)
- ON DELETE CASCADE
- ON UPDATE CASCADE;
-
-
-ALTER TABLE `mso_catalog`.`service_to_networks`
- ADD INDEX `fk_service_to_networks__service_model_uuid_idx` (`SERVICE_MODEL_UUID` ASC),
- ADD INDEX `fk_service_to_networks__network_resource_customization1_idx` (`NETWORK_MODEL_CUSTOMIZATION_UUID` ASC),
- ADD CONSTRAINT `fk_service_to_networks__service__service_name_version_id`
- FOREIGN KEY (`SERVICE_MODEL_UUID`)
- REFERENCES `mso_catalog`.`service` (`SERVICE_NAME_VERSION_ID`)
- ON DELETE CASCADE
- ON UPDATE CASCADE,
- ADD CONSTRAINT `fk_service_to_networks__network_resource_customization1`
- FOREIGN KEY (`NETWORK_MODEL_CUSTOMIZATION_UUID`)
- REFERENCES `mso_catalog`.`network_resource_customization` (`MODEL_CUSTOMIZATION_UUID`)
- ON DELETE CASCADE
- ON UPDATE CASCADE;
-
-
-ALTER TABLE `mso_catalog`.`vf_module`
- ADD INDEX `UK_model_customization_uuid__asdc_service_model_version` (`MODEL_CUSTOMIZATION_UUID` ASC, `ASDC_SERVICE_MODEL_VERSION` ASC);
-
-ALTER TABLE `mso_catalog`.`vnf_resource`
- ADD UNIQUE INDEX `UK_model_customization_uuid__asdc_service_model_version` (`MODEL_CUSTOMIZATION_UUID` ASC, `ASDC_SERVICE_MODEL_VERSION` ASC);
-
-ALTER TABLE `mso_catalog`.`network_resource_customization`
- ADD INDEX `fk_network_resource_customization__network_resource_id_idx` (`NETWORK_RESOURCE_ID` ASC),
- ADD CONSTRAINT `fk_network_resource_customization__network_resource__id`
- FOREIGN KEY (`NETWORK_RESOURCE_ID`)
- REFERENCES `mso_catalog`.`network_resource` (`id`)
- ON DELETE CASCADE
- ON UPDATE CASCADE; \ No newline at end of file
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql
deleted file mode 100644
index bc88adcc70..0000000000
--- a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-USE `mso_catalog`;
-
-ALTER TABLE HEAT_ENVIRONMENT MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE NETWORK_RECIPE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE NETWORK_RESOURCE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE SERVICE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE VNF_COMPONENTS MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE VNF_COMPONENTS_RECIPE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE VNF_RECIPE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE VNF_RESOURCE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE HEAT_FILES MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE HEAT_TEMPLATE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE VF_MODULE MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE SERVICE_RECIPE MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE NETWORK_RESOURCE_CUSTOMIZATION MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE ALLOTTED_RESOURCE_CUSTOMIZATION MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE SERVICE_TO_ALLOTTED_RESOURCES MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL;
-ALTER TABLE SERVICE_TO_NETWORKS MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL;
-
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalogdb/V2.10__UpdateNorthboundRequestToUseInstance.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalogdb/V2.10__UpdateNorthboundRequestToUseInstance.sql
new file mode 100644
index 0000000000..5ee4deb26e
--- /dev/null
+++ b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalogdb/V2.10__UpdateNorthboundRequestToUseInstance.sql
@@ -0,0 +1,24 @@
+USE catalogdb;
+
+
+
+UPDATE northbound_request_ref_lookup SET ACTION = 'createInstance' WHERE MACRO_ACTION = 'Service-Create';
+UPDATE northbound_request_ref_lookup SET ACTION = 'deleteInstance' WHERE MACRO_ACTION = 'Service-Delete';
+UPDATE northbound_request_ref_lookup SET ACTION = 'assignInstance' WHERE MACRO_ACTION = 'Service-Macro-Assign';
+UPDATE northbound_request_ref_lookup SET ACTION = 'activateInstance' WHERE MACRO_ACTION = 'Service-Macro-Activate';
+UPDATE northbound_request_ref_lookup SET ACTION = 'unassignInstance' WHERE MACRO_ACTION = 'Service-Macro-Unassign';
+UPDATE northbound_request_ref_lookup SET ACTION = 'createInstance' WHERE MACRO_ACTION = 'Service-Macro-Create';
+UPDATE northbound_request_ref_lookup SET ACTION = 'deleteInstance' WHERE MACRO_ACTION = 'Service-Macro-Delete';
+UPDATE northbound_request_ref_lookup SET ACTION = 'createInstance' WHERE MACRO_ACTION = 'Network-Create';
+UPDATE northbound_request_ref_lookup SET ACTION = 'deleteInstance' WHERE MACRO_ACTION = 'Network-Delete';
+UPDATE northbound_request_ref_lookup SET ACTION = 'replaceInstance' WHERE MACRO_ACTION = 'VNF-Macro-Replace';
+UPDATE northbound_request_ref_lookup SET ACTION = 'createInstance' WHERE MACRO_ACTION = 'VNF-Create';
+UPDATE northbound_request_ref_lookup SET ACTION = 'deleteInstance' WHERE MACRO_ACTION = 'VNF-Delete';
+UPDATE northbound_request_ref_lookup SET ACTION = 'createInstance' WHERE MACRO_ACTION = 'VolumeGroup-Create';
+UPDATE northbound_request_ref_lookup SET ACTION = 'deleteInstance' WHERE MACRO_ACTION = 'VolumeGroup-Delete';
+UPDATE northbound_request_ref_lookup SET ACTION = 'createInstance' WHERE MACRO_ACTION = 'VFModule-Create';
+UPDATE northbound_request_ref_lookup SET ACTION = 'deleteInstance' WHERE MACRO_ACTION = 'VFModule-Delete';
+UPDATE northbound_request_ref_lookup SET ACTION = 'createInstance' WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create';
+UPDATE northbound_request_ref_lookup SET ACTION = 'deleteInstance' WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete';
+UPDATE northbound_request_ref_lookup SET ACTION = 'deleteInstance' WHERE MACRO_ACTION = 'AVPNBonding-Macro-Delete';
+UPDATE northbound_request_ref_lookup SET ACTION = 'createInstance' WHERE MACRO_ACTION = 'AVPNBonding-Macro-Create'; \ No newline at end of file
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalogdb/V3.0__UpdateOrchFlowTableWithATTFlows.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalogdb/V3.0__UpdateOrchFlowTableWithATTFlows.sql
new file mode 100644
index 0000000000..ec9848563a
--- /dev/null
+++ b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalogdb/V3.0__UpdateOrchFlowTableWithATTFlows.sql
@@ -0,0 +1,16 @@
+USE catalogdb;
+
+UPDATE orchestration_flow_reference SET FLOW_NAME = 'AssignServiceInstanceATTBB' WHERE FLOW_NAME = 'AssignServiceInstanceBB';
+UPDATE orchestration_flow_reference SET FLOW_NAME = 'ActivateServiceInstanceATTBB' WHERE FLOW_NAME = 'ActivateServiceInstanceBB';
+UPDATE orchestration_flow_reference SET FLOW_NAME = 'DeactivateServiceInstanceATTBB' WHERE FLOW_NAME = 'DeactivateServiceInstanceBB';
+UPDATE orchestration_flow_reference SET FLOW_NAME = 'UnassignServiceInstanceATTBB' WHERE FLOW_NAME = 'UnassignServiceInstanceBB';
+
+UPDATE rainy_day_handler_macro SET FLOW_NAME = 'AssignServiceInstanceATTBB' WHERE FLOW_NAME = 'AssignServiceInstanceBB';
+UPDATE rainy_day_handler_macro SET FLOW_NAME = 'ActivateServiceInstanceATTBB' WHERE FLOW_NAME = 'ActivateServiceInstanceBB';
+UPDATE rainy_day_handler_macro SET FLOW_NAME = 'DeactivateServiceInstanceATTBB' WHERE FLOW_NAME = 'DeactivateServiceInstanceBB';
+UPDATE rainy_day_handler_macro SET FLOW_NAME = 'UnassignServiceInstanceATTBB' WHERE FLOW_NAME = 'UnassignServiceInstanceBB';
+
+UPDATE building_block_detail SET BUILDING_BLOCK_NAME = 'AssignServiceInstanceATTBB' WHERE BUILDING_BLOCK_NAME = 'AssignServiceInstanceBB';
+UPDATE building_block_detail SET BUILDING_BLOCK_NAME = 'ActivateServiceInstanceATTBB' WHERE BUILDING_BLOCK_NAME = 'ActivateServiceInstanceBB';
+UPDATE building_block_detail SET BUILDING_BLOCK_NAME = 'DeactivateServiceInstanceATTBB' WHERE BUILDING_BLOCK_NAME = 'DeactivateServiceInstanceBB';
+UPDATE building_block_detail SET BUILDING_BLOCK_NAME = 'UnassignServiceInstanceATTBB' WHERE BUILDING_BLOCK_NAME = 'UnassignServiceInstanceBB'; \ No newline at end of file
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql
deleted file mode 100644
index 3b2de4c0b7..0000000000
--- a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE SITE_STATUS MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;