diff options
author | maopengzhang <zhang.maopeng1@zte.com.cn> | 2017-09-16 09:33:23 +0800 |
---|---|---|
committer | maopengzhang <zhang.maopeng1@zte.com.cn> | 2017-09-16 09:33:23 +0800 |
commit | 61bbe1952821a9c1b6e3f73b75e1f3b2f638e51e (patch) | |
tree | 3b0b7e554e2b345936b24ca4cad7de0d3ec7c3af /resources | |
parent | fd6102b82650918168e243d493421fe65714f4c3 (diff) |
Modify catalog SQL
Modify catalog SQL
Change-Id: I03ade0834ee3cb7a46210a4ec258472fccd05206
Issue-ID: VFC-33
Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn>
Diffstat (limited to 'resources')
-rw-r--r-- | resources/dbscripts/mysql/vfc-nfvo-catalog-createobj.sql | 91 |
1 files changed, 25 insertions, 66 deletions
diff --git a/resources/dbscripts/mysql/vfc-nfvo-catalog-createobj.sql b/resources/dbscripts/mysql/vfc-nfvo-catalog-createobj.sql index 6aba3eee..34130acb 100644 --- a/resources/dbscripts/mysql/vfc-nfvo-catalog-createobj.sql +++ b/resources/dbscripts/mysql/vfc-nfvo-catalog-createobj.sql @@ -16,70 +16,29 @@ use nfvocatalog; -DROP TABLE IF EXISTS NFVO_JOB; -CREATE TABLE NFVO_JOB ( - `JOBID` varchar(255) NOT NULL PRIMARY KEY, - `JOBTYPE` varchar (255) NOT NULL, - `JOBACTION` varchar(255) NOT NULL, - `RESID` varchar(255) NOT NULL, - `STATUS` integer NULL, - `STARTTIME` varchar(255) NULL, - `ENDTIME` varchar(255) NULL, - `PROGRESS` integer NULL, - `USER` varchar(255) NULL, - `PARENTJOBID` varchar(255) NULL, - `RESNAME` varchar(255) NULL -); - -DROP TABLE IF EXISTS NFVO_JOB_STATUS; -CREATE TABLE NFVO_JOB_STATUS ( - `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, - `INDEXID` integer NOT NULL, - `JOBID` varchar(255) NOT NULL, - `STATUS` varchar(255) NOT NULL, - `PROGRESS` integer NULL, - `DESCP` longtext NOT NULL, - `ERRCODE` varchar(255) NULL, - `ADDTIME` varchar(255) NULL -); - - -DROP TABLE IF EXISTS NFVO_NFPACKAGE; -CREATE TABLE NFVO_NFPACKAGE ( - `UUID` varchar(255) NOT NULL PRIMARY KEY, - `NFPACKAGEID` varchar(200) NOT NULL, - `VNFDID` varchar(255) NOT NULL, - `VENDOR` varchar(255) NOT NULL, - `VNFDVERSION` varchar(255) NOT NULL, - `VNFVERSION` varchar(255) NOT NULL, - `VNFDMODEL` longtext NULL, - `VNFDPATH` varchar(300) NULL -); - -DROP TABLE IF EXISTS NFVO_NSPACKAGE; -CREATE TABLE NFVO_NSPACKAGE ( - `ID` varchar(200) NOT NULL PRIMARY KEY, - `NSDID` varchar(200) NOT NULL, - `NAME` varchar(200) NOT NULL, - `VENDOR` varchar(200) NULL, - `DESCRIPTION` varchar(200) NULL, - `VERSION` varchar(200) NULL, - `NSDMODEL` longtext NULL, - `NSDPATH` varchar(300) NULL -); - - -DROP TABLE IF EXISTS NFVO_NFPACKAGEFILE; -CREATE TABLE NFVO_NFPACKAGEFILE ( - `ID` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, - `NFPACKAGEID` varchar(50) NOT NULL, - `FILENAME` varchar(100) NOT NULL, - `FILETYPE` varchar(2) NOT NULL, - `IMAGEID` varchar(50) NOT NULL, - `VIMID` varchar(50) NOT NULL, - `VIMUSER` varchar(50) NOT NULL, - `TENANT` varchar(50) NOT NULL, - `PURPOSE` varchar(1000) NOT NULL, - `STATUS` varchar(10) NOT NULL -); +DROP TABLE IF EXISTS CATALOG_JOB; +DROP TABLE IF EXISTS CATALOG_JOB_STATUS; +DROP TABLE IF EXISTS CATALOG_NSPACKAGE; +DROP TABLE IF EXISTS CATALOG_SOFTWAREIMAGEMODEL; +DROP TABLE IF EXISTS CATALOG_VNFPACKAGE; +-- +-- Create model JobModel +-- +CREATE TABLE `CATALOG_JOB` (`JOBID` varchar(255) NOT NULL PRIMARY KEY, `JOBTYPE` varchar(255) NOT NULL, `JOBACTION` varchar(255) NOT NULL, `RESID` varchar(255) NOT NULL, `STATUS` integer NULL, `STARTTIME` varchar(255) NULL, `ENDTIME` varchar(255) NULL, `PROGRESS` integer NULL, `USER` varchar(255) NULL, `PARENTJOBID` varchar(255) NULL, `RESNAME` varchar(255) NULL); +-- +-- Create model JobStatusModel +-- +CREATE TABLE `CATALOG_JOB_STATUS` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `INDEXID` integer NOT NULL, `JOBID` varchar(255) NOT NULL, `STATUS` varchar(255) NOT NULL, `PROGRESS` integer NULL, `DESCP` longtext NOT NULL, `ERRCODE` varchar(255) NULL, `ADDTIME` varchar(255) NULL); +-- +-- Create model NSPackageModel +-- +CREATE TABLE `CATALOG_NSPACKAGE` (`NSPACKAGEID` varchar(50) NOT NULL PRIMARY KEY, `NSPACKAGEURI` varchar(300) NULL, `CHECKSUM` varchar(50) NULL, `SDCCSARID` varchar(50) NULL, `OPERATIONALSTATE` varchar(20) NULL, `USAGESTATE` varchar(20) NULL, `DELETIONPENDING` varchar(20) NULL, `NSDID` varchar(50) NULL, `NSDNAME` varchar(50) NULL, `NSDDESIGNER` varchar(50) NULL, `NSDDESCRIPTION` varchar(100) NULL, `NSDVERSION` varchar(20) NULL, `USERDEFINEDDATA` longtext NULL, `LOCALFILEPATH` varchar(300) NULL, `NSDMODEL` longtext NULL); +-- +-- Create model SoftwareImageModel +-- +CREATE TABLE `CATALOG_SOFTWAREIMAGEMODEL` (`IMAGEID` varchar(50) NOT NULL PRIMARY KEY, `CONTAINERFORMAT` varchar(20) NOT NULL, `DISKFORMAT` varchar(20) NOT NULL, `MINDISK` varchar(20) NOT NULL, `MINRAM` varchar(20) NOT NULL, `USAERMETADATA` varchar(1024) NOT NULL, `VNFPACKAGEID` varchar(50) NOT NULL, `FILEPATH` varchar(300) NOT NULL, `STATUS` varchar(10) NOT NULL, `VIMID` varchar(50) NOT NULL); +-- +-- Create model VnfPackageModel +-- +CREATE TABLE `CATALOG_VNFPACKAGE` (`VNFPACKAGEID` varchar(50) NOT NULL PRIMARY KEY, `VNFPACKAGEURI` varchar(300) NULL, `SDCCSARURI` varchar(300) NULL, `CHECKSUM` varchar(50) NULL, `OPERATIONALSTATE` varchar(20) NULL, `USAGESTATE` varchar(20) NULL, `DELETIONPENDING` varchar(20) NULL, `VNFDID` varchar(50) NULL, `VENDOR` varchar(50) NULL, `VNFDPRODUCTNAME` varchar(50) NULL, `VNFDVERSION` varchar(20) NULL, `VNFSOFTWAREVERSION` varchar(20) NULL, `USERDEFINEDDATA` longtext NULL, `LOCALFILEPATH` varchar(300) NULL, `VNFDMODEL` longtext NULL); |