X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=extra%2Fsql%2Fbulkload%2Fcreate-tables.sql;h=b4c5bf309af3ec3435a795af6d425351404a94bd;hb=897a3e004a858ef68d989dad15dde91a69e151a5;hp=819d92591214d1378f65ba394dc104c113b99636;hpb=b398c32d092ca7ca14fa37d22fae6cbc1710e66e;p=clamp.git diff --git a/extra/sql/bulkload/create-tables.sql b/extra/sql/bulkload/create-tables.sql index 819d9259..b4c5bf30 100644 --- a/extra/sql/bulkload/create-tables.sql +++ b/extra/sql/bulkload/create-tables.sql @@ -11,17 +11,22 @@ ) engine=InnoDB; create table dictionary_elements ( - name varchar(255) not null, + short_name varchar(255) not null, created_by varchar(255), created_timestamp datetime(6) not null, updated_by varchar(255), updated_timestamp datetime(6) not null, - description varchar(255), - short_name varchar(255) not null, - subdictionary_id varchar(255) not null, + description varchar(255) not null, + name varchar(255) not null, + subdictionary_name varchar(255), type varchar(255) not null, - dictionary_id varchar(255), - primary key (name) + primary key (short_name) + ) engine=InnoDB; + + create table dictionary_to_dictionaryelements ( + dictionary_name varchar(255) not null, + dictionary_element_short_name varchar(255) not null, + primary key (dictionary_name, dictionary_element_short_name) ) engine=InnoDB; create table hibernate_sequence ( @@ -36,9 +41,10 @@ created_timestamp datetime(6) not null, updated_by varchar(255), updated_timestamp datetime(6) not null, - blueprint_yaml MEDIUMTEXT not null, + blueprint_yaml MEDIUMTEXT, dcae_blueprint_id varchar(255), loop_element_type varchar(255) not null, + short_name varchar(255), primary key (name) ) engine=InnoDB; @@ -58,6 +64,7 @@ created_timestamp datetime(6) not null, updated_by varchar(255), updated_timestamp datetime(6) not null, + allowed_loop_type varchar(255), blueprint_yaml MEDIUMTEXT, dcae_blueprint_id varchar(255), maximum_instances_allowed integer, @@ -112,15 +119,16 @@ configurations_json json, json_representation json not null, pdp_group varchar(255), + pdp_sub_group varchar(255), context varchar(255), dcae_blueprint_id varchar(255), dcae_deployment_id varchar(255), dcae_deployment_status_url varchar(255), device_type_scope varchar(255), - policy_model_type varchar(255) not null, - policy_tosca MEDIUMTEXT not null, shared bit not null, loop_element_model_id varchar(255), + policy_model_type varchar(255), + policy_model_version varchar(255), primary key (name) ) engine=InnoDB; @@ -133,10 +141,11 @@ configurations_json json, json_representation json not null, pdp_group varchar(255), + pdp_sub_group varchar(255), loop_element_model_id varchar(255), - loop_id varchar(255) not null, policy_model_type varchar(255), policy_model_version varchar(255), + loop_id varchar(255) not null, primary key (name) ) engine=InnoDB; @@ -149,6 +158,7 @@ updated_timestamp datetime(6) not null, policy_acronym varchar(255), policy_tosca MEDIUMTEXT, + policy_pdp_group json, primary key (policy_model_type, version) ) engine=InnoDB; @@ -161,12 +171,14 @@ primary key (service_uuid) ) engine=InnoDB; - alter table dictionary_elements - add constraint UK_qxkrvsrhp26m60apfvxphpl3d unique (short_name); + alter table dictionary_to_dictionaryelements + add constraint FK68hjjinnm8nte2owstd0xwp23 + foreign key (dictionary_element_short_name) + references dictionary_elements (short_name); - alter table dictionary_elements - add constraint FKn87bpgpm9i56w7uko585rbkgn - foreign key (dictionary_id) + alter table dictionary_to_dictionaryelements + add constraint FKtqfxg46gsxwlm2gkl6ne3cxfe + foreign key (dictionary_name) references dictionary (name); alter table loop_logs @@ -224,17 +236,22 @@ foreign key (loop_element_model_id) references loop_element_models (name); + alter table micro_service_policies + add constraint FKn17j9ufmyhqicb6cvr1dbjvkt + foreign key (policy_model_type, policy_model_version) + references policy_models (policy_model_type, version); + alter table operational_policies add constraint FKi9kh7my40737xeuaye9xwbnko foreign key (loop_element_model_id) references loop_element_models (name); - alter table operational_policies - add constraint FK1ddoggk9ni2bnqighv6ecmuwu - foreign key (loop_id) - references loops (name); - alter table operational_policies add constraint FKlsyhfkoqvkwj78ofepxhoctip foreign key (policy_model_type, policy_model_version) references policy_models (policy_model_type, version); + + alter table operational_policies + add constraint FK1ddoggk9ni2bnqighv6ecmuwu + foreign key (loop_id) + references loops (name);