diff options
author | Rob Daugherty <rd472p@att.com> | 2018-04-02 23:33:53 -0400 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2018-04-02 23:36:10 -0400 |
commit | c9b74b470e0090a9451575a2271f05b237a548ea (patch) | |
tree | 84a8e40d64dd0437cd0ea52153b4d578c24eb2d6 | |
parent | 3df5380d24ccc42c7df84e58ae4773a0c1cb03b9 (diff) |
Update MySQL schema scripts
Note that these should be updated whenever the hibernate (hbm.xml)
definition files are modified in the "so" repo.
Change-Id: Ia12164813977cdb52a13397671d8dd3be5eac407
Issue-ID: SO-557
Signed-off-by: Rob Daugherty <rd472p@att.com>
2 files changed, 101 insertions, 45 deletions
diff --git a/volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql b/volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql index 4ee100c..09a0dcb 100644 --- a/volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql +++ b/volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql @@ -30,8 +30,6 @@ drop table if exists ALLOTTED_RESOURCE; drop table if exists ALLOTTED_RESOURCE_CUSTOMIZATION; - - drop table if exists AR_RECIPE; drop table if exists HEAT_ENVIRONMENT; @@ -110,23 +108,11 @@ MIN_INSTANCES integer, MAX_INSTANCES integer, CREATION_TIMESTAMP datetime default CURRENT_TIMESTAMP, + PROVIDING_SERVICE_MODEL_UUID varchar(255), + PROVIDING_SERVICE_MODEL_NAME varchar(255), primary key (MODEL_CUSTOMIZATION_UUID) ); - create table AR_RECIPE ( - id integer not null auto_increment, - MODEL_NAME varchar(20) not null, - ACTION varchar(20) not null, - VERSION_STR varchar(20) not null, - SERVICE_TYPE varchar(45), - DESCRIPTION varchar(1200), - ORCHESTRATION_URI varchar(256) not null, - AR_PARAM_XSD varchar(2048), - RECIPE_TIMEOUT integer, - CREATION_TIMESTAMP datetime default CURRENT_TIMESTAMP, - primary key (id) - ); - create table HEAT_ENVIRONMENT ( ARTIFACT_UUID varchar(200) not null, NAME varchar(100) not null, @@ -258,8 +244,8 @@ SERVICE_CATEGORY varchar(20), SERVICE_TYPE varchar(20), SERVICE_ROLE varchar(20), - ENVIRONMENT_CONTEXT varchar(200) default null, - WORKLOAD_CONTEXT varchar(200) default null, + ENVIRONMENT_CONTEXT varchar(255) default null, + WORKLOAD_CONTEXT varchar(255) default null, primary key (MODEL_UUID) ); @@ -419,6 +405,7 @@ NF_TYPE varchar(200), NF_ROLE varchar(200), NF_NAMING_CODE varchar(200), + MULTI_STAGE_DESIGN varchar(200), VNF_RESOURCE_MODEL_UUID varchar(200) not null, CREATION_TIMESTAMP datetime default CURRENT_TIMESTAMP, primary key (MODEL_CUSTOMIZATION_UUID) diff --git a/volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Requests-schema.sql b/volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Requests-schema.sql index f64548e..947f464 100644 --- a/volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Requests-schema.sql +++ b/volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Requests-schema.sql @@ -1,8 +1,47 @@ + drop table if exists ACTIVATE_OPERATIONAL_ENV_PER_DISTRIBUTIONID_STATUS; + + drop table if exists ACTIVATE_OPERATIONAL_ENV_SERVICE_MODEL_DISTRIBUTION_STATUS; + drop table if exists INFRA_ACTIVE_REQUESTS; + drop table if exists OPERATION_STATUS; + + drop table if exists RESOURCE_OPERATION_STATUS; + drop table if exists SITE_STATUS; + drop table if exists WATCHDOG_DISTRIBUTIONID_STATUS; + + drop table if exists WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS; + + drop table if exists WATCHDOG_SERVICE_MOD_VER_ID_LOOKUP; + + create table ACTIVATE_OPERATIONAL_ENV_PER_DISTRIBUTIONID_STATUS ( + DISTRIBUTION_ID varchar(45) not null, + OPERATIONAL_ENV_ID varchar(45), + SERVICE_MODEL_VERSION_ID varchar(45), + DISTRIBUTION_ID_STATUS varchar(45), + DISTRIBUTION_ID_ERROR_REASON varchar(250), + REQUEST_ID varchar(45), + CREATE_TIME datetime, + MODIFY_TIME datetime, + primary key (DISTRIBUTION_ID) + ); + + create table ACTIVATE_OPERATIONAL_ENV_SERVICE_MODEL_DISTRIBUTION_STATUS ( + OPERATIONAL_ENV_ID varchar(45) not null, + SERVICE_MODEL_VERSION_ID varchar(45) not null, + REQUEST_ID varchar(45) not null, + SERVICE_MOD_VER_FINAL_DISTR_STATUS varchar(45), + RECOVERY_ACTION varchar(30), + RETRY_COUNT_LEFT integer, + WORKLOAD_CONTEXT varchar(80), + CREATE_TIME datetime, + MODIFY_TIME datetime, + primary key (OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID) + ); + create table INFRA_ACTIVE_REQUESTS ( REQUEST_ID varchar(45) not null, CLIENT_REQUEST_ID varchar(45), @@ -33,52 +72,82 @@ VF_MODULE_NAME varchar(200), VF_MODULE_MODEL_NAME varchar(200), AAI_SERVICE_ID varchar(50), - AIC_CLOUD_REGION varchar(11), + AIC_CLOUD_REGION varchar(200), CALLBACK_URL varchar(200), CORRELATOR varchar(80), SERVICE_INSTANCE_ID varchar(45), SERVICE_INSTANCE_NAME varchar(80), - REQUEST_SCOPE varchar(20), + REQUEST_SCOPE varchar(45), REQUEST_ACTION varchar(45) not null, NETWORK_ID varchar(45), NETWORK_NAME varchar(80), NETWORK_TYPE varchar(80), REQUESTOR_ID varchar(80), + CONFIGURATION_ID varchar(45), + CONFIGURATION_NAME varchar(200), + OPERATIONAL_ENV_ID varchar(45), + OPERATIONAL_ENV_NAME varchar(200), primary key (REQUEST_ID) ); + create table OPERATION_STATUS ( + SERVICE_ID varchar(255) not null, + OPERATION_ID varchar(256) not null, + OPERATION_TYPE varchar(256), + USER_ID varchar(256), + RESULT varchar(256), + OPERATION_CONTENT varchar(256), + PROGRESS varchar(256), + REASON varchar(256), + OPERATE_AT datetime default CURRENT_TIMESTAMP, + FINISHED_AT datetime, + primary key (SERVICE_ID, OPERATION_ID) + ); + + create table RESOURCE_OPERATION_STATUS ( + SERVICE_ID varchar(255) not null, + OPERATION_ID varchar(256) not null, + RESOURCE_TEMPLATE_UUID varchar(255) not null, + OPER_TYPE varchar(256), + RESOURCE_INSTANCE_ID varchar(256), + JOB_ID varchar(256), + STATUS varchar(256), + PROGRESS varchar(256), + ERROR_CODE varchar(256), + STATUS_DESCRIPOTION varchar(256), + primary key (SERVICE_ID, OPERATION_ID, RESOURCE_TEMPLATE_UUID) + ); + create table SITE_STATUS ( SITE_NAME varchar(255) not null, STATUS bit, CREATION_TIMESTAMP datetime default CURRENT_TIMESTAMP, primary key (SITE_NAME) ); - create table OPERATION_STATUS ( - SERVICE_ID varchar(255) not null, - OPERATION_ID varchar(255) not null, - SERVICE_NAME varchar(255), - OPERATION_TYPE varchar(255), - USER_ID varchar(255), - RESULT varchar(255), - OPERATION_CONTENT varchar(255), - PROGRESS varchar(255), - REASON varchar(255), - OPERATE_AT datetime, - FINISHED_AT datetime, - primary key (SERVICE_ID,OPERATION_ID) + + create table WATCHDOG_DISTRIBUTIONID_STATUS ( + DISTRIBUTION_ID varchar(45) not null, + DISTRIBUTION_ID_STATUS varchar(45), + CREATE_TIME datetime, + MODIFY_TIME datetime, + primary key (DISTRIBUTION_ID) ); - create table RESOURCE_OPERATION_STATUS ( - SERVICE_ID varchar(255) not null, - OPERATION_ID varchar(255) not null, - RESOURCE_TEMPLATE_UUID varchar(255) not null, - OPER_TYPE varchar(255), - RESOURCE_INSTANCE_ID varchar(255), - JOB_ID varchar(255), - STATUS varchar(255), - PROGRESS varchar(255), - ERROR_CODE varchar(255) , - STATUS_DESCRIPOTION varchar(255) , - primary key (SERVICE_ID,OPERATION_ID,RESOURCE_TEMPLATE_UUID) + + create table WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS ( + DISTRIBUTION_ID varchar(45) not null, + COMPONENT_NAME varchar(45) not null, + COMPONENT_DISTRIBUTION_STATUS varchar(45), + CREATE_TIME datetime, + MODIFY_TIME datetime, + primary key (DISTRIBUTION_ID, COMPONENT_NAME) ); + + create table WATCHDOG_SERVICE_MOD_VER_ID_LOOKUP ( + DISTRIBUTION_ID varchar(45) not null, + SERVICE_MODEL_VERSION_ID varchar(45) not null, + CREATE_TIME datetime, + primary key (DISTRIBUTION_ID, SERVICE_MODEL_VERSION_ID) + ); + alter table INFRA_ACTIVE_REQUESTS add constraint UK_bhu6w8p7wvur4pin0gjw2d5ak unique (CLIENT_REQUEST_ID); |