summaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main')
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.3__AddBluePrintNameVersion.sql8
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.4__AddPnfResourceAndCustomization.sql39
2 files changed, 47 insertions, 0 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.3__AddBluePrintNameVersion.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.3__AddBluePrintNameVersion.sql
new file mode 100644
index 0000000000..97397df290
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.3__AddBluePrintNameVersion.sql
@@ -0,0 +1,8 @@
+use catalogdb;
+
+ALTER TABLE vnf_resource_customization
+ADD CDS_BLUEPRINT_NAME varchar(200) null;
+
+ALTER TABLE vnf_resource_customization
+ADD CDS_BLUEPRINT_VERSION varchar(20) null;
+
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.4__AddPnfResourceAndCustomization.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.4__AddPnfResourceAndCustomization.sql
new file mode 100644
index 0000000000..5571bf89ee
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.4__AddPnfResourceAndCustomization.sql
@@ -0,0 +1,39 @@
+use catalogdb;
+
+CREATE TABLE IF NOT EXISTS `pnf_resource` (
+ `ORCHESTRATION_MODE` varchar(20) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE IF NOT EXISTS `pnf_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `PNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `MULTI_STAGE_DESIGN` varchar(20) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(2000) DEFAULT NULL,
+ CDS_BLUEPRINT_NAME varchar(200) DEFAULT NULL,
+ CDS_BLUEPRINT_VERSION varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_pnf_resource_customization__pnf_resource1_idx` (`PNF_RESOURCE_MODEL_UUID`),
+ CONSTRAINT `fk_pnf_resource_customization__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+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`)
+)ENGINE=InnoDB DEFAULT CHARSET=latin1; \ No newline at end of file