diff options
author | 2019-04-29 13:35:51 +0000 | |
---|---|---|
committer | 2019-04-29 13:35:51 +0000 | |
commit | 81c1466f6657d41dc01b5271b18430875fd2e3f9 (patch) | |
tree | 47c5fd0479bbc0d2a318162ecfa75e529a27fb74 /mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql | |
parent | 702ab6907b58bfac82a17c52ecdc70ef4084ef6f (diff) | |
parent | a10606e383ce6c872cb7c95fe1d5e65565827813 (diff) |
Merge "Store Cloud Request in Database"
Diffstat (limited to 'mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql')
-rw-r--r-- | mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql index 2bd9936b3a..65372b7b48 100644 --- a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql @@ -1,5 +1,5 @@ -create table ACTIVATE_OPERATIONAL_ENV_SERVICE_MODEL_DISTRIBUTION_STATUS ( +create table IF NOT EXISTS ACTIVATE_OPERATIONAL_ENV_SERVICE_MODEL_DISTRIBUTION_STATUS ( REQUEST_ID varchar(255) not null, OPERATIONAL_ENV_ID varchar(255) not null, SERVICE_MODEL_VERSION_ID varchar(255) not null, @@ -13,7 +13,7 @@ create table ACTIVATE_OPERATIONAL_ENV_SERVICE_MODEL_DISTRIBUTION_STATUS ( primary key (REQUEST_ID,OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID) ); -create table OPERATION_STATUS ( +create table IF NOT EXISTS OPERATION_STATUS ( SERVICE_ID varchar(255) not null, OPERATION_ID varchar(255) not null, SERVICE_NAME varchar(255), @@ -46,7 +46,7 @@ INSERT INTO PUBLIC.OPERATION_STATUS(SERVICE_ID, OPERATION_ID, OPERATION_TYPE, US primary key (SERVICE_ID,OPERATION_ID,RESOURCE_TEMPLATE_UUID) ); -CREATE CACHED TABLE PUBLIC.INFRA_ACTIVE_REQUESTS( +CREATE TABLE IF NOT EXISTS PUBLIC.INFRA_ACTIVE_REQUESTS( REQUEST_ID VARCHAR NOT NULL SELECTIVITY 100, CLIENT_REQUEST_ID VARCHAR SELECTIVITY 6, ACTION VARCHAR SELECTIVITY 1, @@ -168,6 +168,17 @@ CREATE CACHED TABLE PUBLIC.ARCHIVED_INFRA_REQUESTS( REQUEST_URL VARCHAR SELECTIVITY 1 ); +CREATE TABLE IF NOT EXISTS cloud_api_requests( +`ID` INT(13) NOT NULL AUTO_INCREMENT, +`REQUEST_BODY` LONGTEXT NOT NULL, +`CLOUD_IDENTIFIER` VARCHAR(200) NULL, +`SO_REQUEST_ID` VARCHAR(45) NOT NULL, +`CREATE_TIME` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY (`ID`), +CONSTRAINT fk_cloud_api_req_infra_requests + FOREIGN KEY (SO_REQUEST_ID) + REFERENCES infra_active_requests (REQUEST_ID)); + CREATE CACHED TABLE PUBLIC.SITE_STATUS( SITE_NAME VARCHAR NOT NULL, STATUS VARCHAR, |