From 3a83e2a2ff88ef49535973df8dc77dc8015170da Mon Sep 17 00:00:00 2001 From: ash74268 Date: Fri, 31 Jan 2020 15:40:15 +0000 Subject: Changes include Metadata support, Upload tosca policy model and Loop Template CLAMP Metadata support to parse policy_model_type, acronym and clamp_possible_values from the Tosca Policy Model UI and Backend changes to support Loop Template Backend APIs for Dictionary referenced in the Tosca Policy Model. Upload Tosca Model UI changes to allow user to upload policy models. DB Schema changes for the Loop Element Model and updated schema for the Dictionary Added Jest test cases and snapshots checkstyle issues fix and Junits Issue-ID: CLAMP-580 Signed-off-by: ash74268 Change-Id: I57521bc1c3afaf4ca5a2acf4c59823df05fd4cd6 Signed-off-by: ash74268 --- extra/sql/bulkload/create-tables.sql | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'extra/sql/bulkload/create-tables.sql') diff --git a/extra/sql/bulkload/create-tables.sql b/extra/sql/bulkload/create-tables.sql index 4edb46916..50c8d42ca 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 ( @@ -39,6 +44,7 @@ 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, @@ -161,12 +168,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 -- cgit 1.2.3-korg