From 2ce8c8e9e450ec1b885823c8dd3d985eaac260ac Mon Sep 17 00:00:00 2001
From: Ubuntu <sunshine.wang@huawei.com>
Date: Fri, 13 Dec 2019 12:05:20 +0800
Subject: add pnf_resource_to_workflow to catalogdb bind the pnf model uuid to
 pnf workflow

Issue-ID: SO-2558

Signed-off-by: Yaoguang Wang <sunshine.wang@huawei.com>
Change-Id: I779ba8bef8ca3bb67ab6e9245eafec8b84571c85
---
 mso-catalog-db/src/test/resources/schema.sql | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'mso-catalog-db/src/test/resources/schema.sql')

diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index 67584133f8..5668ae5718 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -1241,6 +1241,18 @@ CREATE TABLE IF NOT EXISTS `vnf_resource_to_workflow` (
   CONSTRAINT `fk_vnf_resource_to_workflow__workflow1` FOREIGN KEY (`WORKFLOW_ID`) REFERENCES `workflow` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
+CREATE TABLE IF NOT EXISTS `pnf_resource_to_workflow` (
+  `ID` int(11) NOT NULL AUTO_INCREMENT,
+  `PNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+  `WORKFLOW_ID` int(11) NOT NULL,
+  PRIMARY KEY (`ID`),
+  UNIQUE KEY `UK_pnf_resource_to_workflow` (`PNF_RESOURCE_MODEL_UUID`,`WORKFLOW_ID`),
+  KEY `fk_pnf_resource_to_workflow__workflow1_idx` (`WORKFLOW_ID`),
+  KEY `fk_pnf_resource_to_workflow__pnf_res_mod_uuid_idx` (`PNF_RESOURCE_MODEL_UUID`),
+  CONSTRAINT `fk_pnf_resource_to_workflow__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+  CONSTRAINT `fk_pnf_resource_to_workflow__workflow1` FOREIGN KEY (`WORKFLOW_ID`) REFERENCES `workflow` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
 CREATE TABLE IF NOT EXISTS `activity_spec` (
   `ID` INT(11) NOT NULL AUTO_INCREMENT,
   `NAME` VARCHAR(200) NOT NULL,
-- 
cgit 1.2.3-korg

