diff options
author | Chuanyu Chen <chenchuanyu@huawei.com> | 2019-12-18 06:06:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-12-18 06:06:32 +0000 |
commit | 145eb372a14a2dd25f75033acd37e269c33caf95 (patch) | |
tree | c4dd325c182d3d9c3d4d7678dcc298ee44624ee2 /mso-catalog-db/src/test | |
parent | ef4e7b50f4dc76ca042ddda76cdcf4e5ed10d9f4 (diff) | |
parent | 2ce8c8e9e450ec1b885823c8dd3d985eaac260ac (diff) |
Merge "add pnf_resource_to_workflow to catalogdb bind the pnf model uuid to pnf workflow"
Diffstat (limited to 'mso-catalog-db/src/test')
-rw-r--r-- | mso-catalog-db/src/test/resources/data.sql | 5 | ||||
-rw-r--r-- | mso-catalog-db/src/test/resources/schema.sql | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql index eaad15ca57..e5963c183f 100644 --- a/mso-catalog-db/src/test/resources/data.sql +++ b/mso-catalog-db/src/test/resources/data.sql @@ -768,10 +768,15 @@ insert into pnf_resource_customization_to_service(service_model_uuid, resource_m insert into workflow(artifact_uuid, artifact_name, name, operation_name, version, description, body, resource_target, source) values ('5b0c4322-643d-4c9f-b184-4516049e99b1', 'testingWorkflow.bpmn', 'testingWorkflow', 'create', 1, 'Test Workflow', null, 'vnf', 'sdc'); +insert into workflow(artifact_uuid, artifact_name, name, operation_name, version, description, body, resource_target, source) values +('b2fd5627-55e4-4f4f-8064-9e6f443e9152','DummyPnfWorkflow','Dummy Pnf Workflow','DummyPnfWorkflow',1.0,'Dummy Pnf Workflow to test custom Pnf workflow',null,'pnf','native'); insert into vnf_resource_to_workflow(vnf_resource_model_uuid, workflow_id) values ('ff2ae348-214a-11e7-93ae-92361f002671', '1'); +Insert into pnf_resource_to_workflow (`PNF_RESOURCE_MODEL_UUID`,`WORKFLOW_ID`) values +("ff2ae348-214a-11e7-93ae-92361f002680", 2); + insert into activity_spec(name, description, version) values ('testActivity1', 'Test Activity 1', 1); 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, |