aboutsummaryrefslogtreecommitdiffstats
path: root/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db
diff options
context:
space:
mode:
authorByung-Woo Jun <byung-woo.jun@est.tech>2020-09-04 12:36:59 +0000
committerGerrit Code Review <gerrit@onap.org>2020-09-04 12:36:59 +0000
commitfd32f8a06d39cc122c030aea7e65a40fe08e8ee1 (patch)
tree2e17f1ae756c802a582309e71e0efc6f0fdbab5e /so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db
parent58c097ac16bb2cddd20ccd77e42899ef0868fc00 (diff)
parentc78c3e45c2e5d18f6dfa15f74270a52aea7defe4 (diff)
Merge "Initialise NFVO Database Tables"
Diffstat (limited to 'so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db')
-rw-r--r--so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db/migration/V1_1__create_nfvo_tables.sql72
1 files changed, 72 insertions, 0 deletions
diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db/migration/V1_1__create_nfvo_tables.sql b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db/migration/V1_1__create_nfvo_tables.sql
new file mode 100644
index 0000000000..e4c959d6e3
--- /dev/null
+++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db/migration/V1_1__create_nfvo_tables.sql
@@ -0,0 +1,72 @@
+use nfvo;
+
+CREATE TABLE IF NOT EXISTS `JOB` (
+ `JOB_ID` varchar(255) NOT NULL,
+ `JOB_TYPE` varchar(255) NOT NULL,
+ `JOB_ACTION` varchar(255) NOT NULL,
+ `RESOURCE_ID` varchar(255) NOT NULL,
+ `RESOURCE_NAME` varchar(255) DEFAULT NULL,
+ `STATUS` varchar(255) NOT NULL,
+ `START_TIME` DATETIME DEFAULT NULL,
+ `END_TIME` DATETIME DEFAULT NULL,
+ `PROGRESS` int(11) DEFAULT NULL,
+ `PROCESS_INSTANCE_ID` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`JOB_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `JOB_STATUS` (
+ `ID` INT NOT NULL AUTO_INCREMENT,
+ `UPDATED_TIME` DATETIME NOT NULL,
+ `DESCRIPTION` longtext DEFAULT NULL,
+ `STATUS` varchar(255) NOT NULL,
+ `JOB_ID` varchar(255) NOT NULL,
+ PRIMARY KEY (`ID`),
+ FOREIGN KEY (JOB_ID)
+ REFERENCES JOB(JOB_ID)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `NS_INST` (
+ `NS_INST_ID` varchar(255) NOT NULL,
+ `NAME` varchar(255) NOT NULL,
+ `NS_PACKAGE_ID` varchar(255) DEFAULT NULL,
+ `NSD_ID` varchar(255) NOT NULL,
+ `NSD_INVARIANT_ID` varchar(255) NOT NULL,
+ `DESCRIPTION` longtext DEFAULT NULL,
+ `STATUS` varchar(255) NOT NULL,
+ `STATUS_UPDATED_TIME` DATETIME NOT NULL,
+ `GLOBAL_CUSTOMER_ID` varchar(255) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`NS_INST_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `NF_INST` (
+ `NF_INST_ID` varchar(255) NOT NULL,
+ `NAME` varchar(255) DEFAULT NULL,
+ `VNFD_ID` varchar(255) DEFAULT NULL,
+ `PACKAGE_ID` varchar(255) DEFAULT NULL,
+ `NS_INST_ID` varchar(255) NOT NULL,
+ `STATUS` varchar(255) NOT NULL,
+ `CREATE_TIME` DATETIME DEFAULT NULL,
+ `LAST_UPDATE_TIME` DATETIME DEFAULT NULL,
+ PRIMARY KEY (`NF_INST_ID`),
+ FOREIGN KEY (NS_INST_ID)
+ REFERENCES NS_INST(NS_INST_ID)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `NS_LCM_OP_OCCS` (
+ `ID` varchar(255) NOT NULL,
+ `OPERATION_STATE` varchar(255) NOT NULL,
+ `STATE_ENTERED_TIME` DATETIME DEFAULT NULL,
+ `START_TIME` DATETIME DEFAULT NULL,
+ `NS_INST_ID` varchar(255) NOT NULL,
+ `OPERATION` varchar(255) NOT NULL,
+ `IS_AUTO_INNOVATION` varchar(255) NOT NULL,
+ `OPERATION_PARAMS` longtext NOT NULL,
+ `IS_CANCEL_PENDING` varchar(255) NOT NULL,
+ PRIMARY KEY (`ID`),
+ FOREIGN KEY (NS_INST_ID)
+ REFERENCES NS_INST(NS_INST_ID)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;