diff options
author | waqas.ikram <waqas.ikram@est.tech> | 2023-01-20 15:13:37 +0000 |
---|---|---|
committer | waqas.ikram <waqas.ikram@est.tech> | 2023-01-20 15:17:06 +0000 |
commit | 80d8598e1013ddee747957adf7d96ec7fb901f0b (patch) | |
tree | 22abb6785bff62898b596012decb777d467377bc /so-cnfm/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration | |
parent | 636794685ae4ff2a5f802fbffdffabbe6bcae164 (diff) |
Adding so cnfm database module
Change-Id: I2eebd5ed356b879f485aad4dd5e6bf46df3ed69b
Issue-ID: SO-4068
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Diffstat (limited to 'so-cnfm/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration')
-rw-r--r-- | so-cnfm/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration/V1_1__create_cnfm_tables.sql | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/so-cnfm/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration/V1_1__create_cnfm_tables.sql b/so-cnfm/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration/V1_1__create_cnfm_tables.sql new file mode 100644 index 0000000..5e75171 --- /dev/null +++ b/so-cnfm/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration/V1_1__create_cnfm_tables.sql @@ -0,0 +1,90 @@ +use cnfm; + +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, + `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 `AS_INST` ( + `AS_INST_ID` varchar(255) NOT NULL, + `NAME` varchar(255) NOT NULL, + `DESCRIPTION` longtext DEFAULT NULL, + `AS_PACKAGE_ID` varchar(255) DEFAULT NULL, + `ASD_ID` varchar(255) NOT NULL, + `ASD_INVARIANT_ID` varchar(255) NOT NULL, + `AS_PROVIDER` varchar(255) NOT NULL, + `AS_APPLICATION_NAME` varchar(255) NOT NULL, + `AS_APPLICATION_VERSION` varchar(255) NOT NULL, + `SERVICE_INSTANCE_ID` varchar(255) NOT NULL, + `SERVICE_INSTANCE_NAME` varchar(255) NOT NULL, + `CLOUD_OWNER` varchar(255) NOT NULL, + `CLOUD_REGION` varchar(255) NOT NULL, + `TENANT_ID` varchar(255) NOT NULL, + `STATUS` varchar(255) NOT NULL, + `STATUS_UPDATED_TIME` DATETIME NOT NULL, + PRIMARY KEY (`AS_INST_ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `AS_DEPLOYMENT_ITEM` ( + `AS_DEP_ITEM_INST_ID` varchar(255) NOT NULL, + `NAME` varchar(255) DEFAULT NULL, + `ITEM_ID` varchar(255) DEFAULT NULL, + `DEPLOYMENT_ORDER` int(11) DEFAULT NULL, + `ARTIFACT_FILE_PATH` varchar(255) DEFAULT NULL, + `STATUS` varchar(255) DEFAULT NULL, + `AS_INST_ID` varchar(255) NOT NULL, + `CREATE_TIME` DATETIME DEFAULT NULL, + `LAST_UPDATE_TIME` DATETIME DEFAULT NULL, + `RELEASE_NAME` varchar(255) NOT NULL, + PRIMARY KEY (`AS_DEP_ITEM_INST_ID`), + FOREIGN KEY (AS_INST_ID) + REFERENCES AS_INST(AS_INST_ID) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `AS_LIFECYCLE_PARAM` ( + `AS_LCP_ID` INT NOT NULL AUTO_INCREMENT, + `AS_DEP_ITEM_INST_ID` varchar(255) NOT NULL, + `LIFECYCLE_PARAM` varchar(255) DEFAULT NULL, + PRIMARY KEY (`AS_LCP_ID`), + FOREIGN KEY (AS_DEP_ITEM_INST_ID) + REFERENCES AS_DEPLOYMENT_ITEM(AS_DEP_ITEM_INST_ID) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `AS_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, + `AS_INST_ID` varchar(255) NOT NULL, + `OPERATION` varchar(255) NOT NULL, + `IS_AUTO_INVOCATION` varchar(255) NOT NULL, + `OPERATION_PARAMS` longtext NOT NULL, + `IS_CANCEL_PENDING` varchar(255) NOT NULL, + `CANCEL_MODE` varchar(255) DEFAULT NULL, + PRIMARY KEY (`ID`), + FOREIGN KEY (AS_INST_ID) + REFERENCES AS_INST(AS_INST_ID) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; |