From e8689688629582187b2484eda21524ee70abbb9f Mon Sep 17 00:00:00 2001
From: "Benjamin, Max (mb388a)" <mb388a@us.att.com>
Date: Wed, 20 Mar 2019 16:19:39 -0400
Subject: Corrected hibernate for cfvc customization table

fix two tests that did not ignore some properties
fix schema sql file that was missing fields
Properly wire hibernate entities, clean up db tables
Update schema.sql files to be consistent
add junit for customization linked to same cvnfc

Change-Id: I4bc0a83cb3908f5b34224416e75446b6cd166b9e
Issue-ID: SO-1689
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
---
 .../db/migration/V5.6__Fix_CVNFC_Customization.sql | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6__Fix_CVNFC_Customization.sql

(limited to 'adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6__Fix_CVNFC_Customization.sql')

diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6__Fix_CVNFC_Customization.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6__Fix_CVNFC_Customization.sql
new file mode 100644
index 0000000000..f09c7362d5
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6__Fix_CVNFC_Customization.sql
@@ -0,0 +1,23 @@
+use catalogdb;
+
+DROP TABLE vnf_vfmodule_cvnfc_configuration_customization;
+
+CREATE TABLE IF NOT EXISTS vnf_vfmodule_cvnfc_configuration_customization (
+  `ID` INT(11) NOT NULL AUTO_INCREMENT, 
+  `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, 
+  `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, 
+  `CONFIGURATION_TYPE` VARCHAR(200) NULL, 
+  `CONFIGURATION_ROLE` VARCHAR(200) NULL, 
+  `CONFIGURATION_FUNCTION` VARCHAR(200) NULL, 
+  `POLICY_NAME` VARCHAR(200) NULL, 
+  `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, 
+  `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL,
+  `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) DEFAULT NULL,
+  `VF_MODULE_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) DEFAULT NULL, 
+  `CVNFC_CUSTOMIZATION_ID` INT(11) DEFAULT NULL,
+  PRIMARY KEY (`ID`), 
+  INDEX `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID` ASC), 
+ 
+  CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) 
+  REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE = INNODB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = LATIN1;
\ No newline at end of file
-- 
cgit 1.2.3-korg

