2 create table dictionary (
3 name varchar(255) not null,
4 created_by varchar(255),
5 created_timestamp datetime(6) not null,
6 updated_by varchar(255),
7 updated_timestamp datetime(6) not null,
8 dictionary_second_level integer,
9 dictionary_type varchar(255),
13 create table dictionary_elements (
14 name varchar(255) not null,
15 created_by varchar(255),
16 created_timestamp datetime(6) not null,
17 updated_by varchar(255),
18 updated_timestamp datetime(6) not null,
19 description varchar(255),
20 short_name varchar(255) not null,
21 subdictionary_id varchar(255) not null,
22 type varchar(255) not null,
23 dictionary_id varchar(255),
27 create table hibernate_sequence (
31 insert into hibernate_sequence values ( 1 );
33 create table loop_element_models (
34 name varchar(255) not null,
35 created_by varchar(255),
36 created_timestamp datetime(6) not null,
37 updated_by varchar(255),
38 updated_timestamp datetime(6) not null,
39 blueprint_yaml varchar(255) not null,
40 loop_element_type varchar(255) not null,
44 create table loop_logs (
46 log_component varchar(255) not null,
47 log_instant datetime(6) not null,
48 log_type varchar(255) not null,
49 message MEDIUMTEXT not null,
50 loop_id varchar(255) not null,
54 create table loop_templates (
55 name varchar(255) not null,
56 created_by varchar(255),
57 created_timestamp datetime(6) not null,
58 updated_by varchar(255),
59 updated_timestamp datetime(6) not null,
60 blueprint_yaml MEDIUMTEXT not null,
61 maximum_instances_allowed integer,
62 svg_representation MEDIUMTEXT,
63 service_uuid varchar(255),
67 create table loopelementmodels_to_policymodels (
68 loop_element_name varchar(255) not null,
69 policy_model_type varchar(255) not null,
70 policy_model_version varchar(255) not null,
71 primary key (loop_element_name, policy_model_type, policy_model_version)
75 name varchar(255) not null,
76 created_by varchar(255),
77 created_timestamp datetime(6) not null,
78 updated_by varchar(255),
79 updated_timestamp datetime(6) not null,
80 blueprint_yaml MEDIUMTEXT not null,
81 dcae_blueprint_id varchar(255),
82 dcae_deployment_id varchar(255),
83 dcae_deployment_status_url varchar(255),
84 global_properties_json json,
85 last_computed_state varchar(255) not null,
86 svg_representation MEDIUMTEXT,
87 loop_template_name varchar(255),
88 service_uuid varchar(255),
92 create table loops_to_microservicepolicies (
93 loop_name varchar(255) not null,
94 microservicepolicy_name varchar(255) not null,
95 primary key (loop_name, microservicepolicy_name)
98 create table looptemplates_to_loopelementmodels (
99 loop_element_model_name varchar(255) not null,
100 loop_template_name varchar(255) not null,
101 flow_order integer not null,
102 primary key (loop_element_model_name, loop_template_name)
105 create table micro_service_policies (
106 name varchar(255) not null,
107 created_by varchar(255),
108 created_timestamp datetime(6) not null,
109 updated_by varchar(255),
110 updated_timestamp datetime(6) not null,
111 configurations_json json,
112 json_representation json not null,
113 pdp_group varchar(255),
114 context varchar(255),
115 dcae_deployment_id varchar(255),
116 dcae_deployment_status_url varchar(255),
117 device_type_scope varchar(255),
118 policy_model_type varchar(255) not null,
119 policy_tosca MEDIUMTEXT not null,
121 loop_element_model_id varchar(255),
125 create table operational_policies (
126 name varchar(255) not null,
127 created_by varchar(255),
128 created_timestamp datetime(6) not null,
129 updated_by varchar(255),
130 updated_timestamp datetime(6) not null,
131 configurations_json json,
132 json_representation json not null,
133 pdp_group varchar(255),
134 loop_element_model_id varchar(255),
135 loop_id varchar(255) not null,
136 policy_model_type varchar(255),
137 policy_model_version varchar(255),
141 create table policy_models (
142 policy_model_type varchar(255) not null,
143 version varchar(255) not null,
144 created_by varchar(255),
145 created_timestamp datetime(6) not null,
146 updated_by varchar(255),
147 updated_timestamp datetime(6) not null,
148 policy_acronym varchar(255),
149 policy_tosca MEDIUMTEXT,
150 primary key (policy_model_type, version)
153 create table services (
154 service_uuid varchar(255) not null,
155 name varchar(255) not null,
156 resource_details json,
157 service_details json,
158 version varchar(255),
159 primary key (service_uuid)
162 alter table dictionary_elements
163 add constraint UK_qxkrvsrhp26m60apfvxphpl3d unique (short_name);
165 alter table dictionary_elements
166 add constraint FKn87bpgpm9i56w7uko585rbkgn
167 foreign key (dictionary_id)
168 references dictionary (name);
170 alter table loop_logs
171 add constraint FK1j0cda46aickcaoxqoo34khg2
172 foreign key (loop_id)
173 references loops (name);
175 alter table loop_templates
176 add constraint FKn692dk6281wvp1o95074uacn6
177 foreign key (service_uuid)
178 references services (service_uuid);
180 alter table loopelementmodels_to_policymodels
181 add constraint FK23j2q74v6kaexefy0tdabsnda
182 foreign key (policy_model_type, policy_model_version)
183 references policy_models (policy_model_type, version);
185 alter table loopelementmodels_to_policymodels
186 add constraint FKjag1iu0olojfwryfkvb5o0rk5
187 foreign key (loop_element_name)
188 references loop_element_models (name);
191 add constraint FK844uwy82wt0l66jljkjqembpj
192 foreign key (loop_template_name)
193 references loop_templates (name);
196 add constraint FK4b9wnqopxogwek014i1shqw7w
197 foreign key (service_uuid)
198 references services (service_uuid);
200 alter table loops_to_microservicepolicies
201 add constraint FKle255jmi7b065fwbvmwbiehtb
202 foreign key (microservicepolicy_name)
203 references micro_service_policies (name);
205 alter table loops_to_microservicepolicies
206 add constraint FK8avfqaf7xl71l7sn7a5eri68d
207 foreign key (loop_name)
208 references loops (name);
210 alter table looptemplates_to_loopelementmodels
211 add constraint FK1k7nbrbugvqa0xfxkq3cj1yn9
212 foreign key (loop_element_model_name)
213 references loop_element_models (name);
215 alter table looptemplates_to_loopelementmodels
216 add constraint FKj29yxyw0x7ue6mwgi6d3qg748
217 foreign key (loop_template_name)
218 references loop_templates (name);
220 alter table micro_service_policies
221 add constraint FKqvvdypacbww07fuv8xvlvdjgl
222 foreign key (loop_element_model_id)
223 references loop_element_models (name);
225 alter table operational_policies
226 add constraint FKi9kh7my40737xeuaye9xwbnko
227 foreign key (loop_element_model_id)
228 references loop_element_models (name);
230 alter table operational_policies
231 add constraint FK1ddoggk9ni2bnqighv6ecmuwu
232 foreign key (loop_id)
233 references loops (name);
235 alter table operational_policies
236 add constraint FKlsyhfkoqvkwj78ofepxhoctip
237 foreign key (policy_model_type, policy_model_version)
238 references policy_models (policy_model_type, version);