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 short_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) not null,
20 name varchar(255) not null,
21 subdictionary_name varchar(255),
22 type varchar(255) not null,
23 primary key (short_name)
26 create table dictionary_to_dictionaryelements (
27 dictionary_name varchar(255) not null,
28 dictionary_element_short_name varchar(255) not null,
29 primary key (dictionary_name, dictionary_element_short_name)
32 create table hibernate_sequence (
36 insert into hibernate_sequence values ( 1 );
38 create table loop_element_models (
39 name varchar(255) not null,
40 created_by varchar(255),
41 created_timestamp datetime(6) not null,
42 updated_by varchar(255),
43 updated_timestamp datetime(6) not null,
44 blueprint_yaml MEDIUMTEXT,
45 dcae_blueprint_id varchar(255),
46 loop_element_type varchar(255) not null,
47 short_name varchar(255),
51 create table loop_logs (
53 log_component varchar(255) not null,
54 log_instant datetime(6) not null,
55 log_type varchar(255) not null,
56 message MEDIUMTEXT not null,
57 loop_id varchar(255) not null,
61 create table loop_templates (
62 name varchar(255) not null,
63 created_by varchar(255),
64 created_timestamp datetime(6) not null,
65 updated_by varchar(255),
66 updated_timestamp datetime(6) not null,
67 allowed_loop_type varchar(255),
68 blueprint_yaml MEDIUMTEXT,
69 dcae_blueprint_id varchar(255),
70 maximum_instances_allowed integer,
71 svg_representation MEDIUMTEXT,
72 unique_blueprint boolean default false,
73 service_uuid varchar(255),
77 create table loopelementmodels_to_policymodels (
78 loop_element_name varchar(255) not null,
79 policy_model_type varchar(255) not null,
80 policy_model_version varchar(255) not null,
81 primary key (loop_element_name, policy_model_type, policy_model_version)
85 name varchar(255) not null,
86 created_by varchar(255),
87 created_timestamp datetime(6) not null,
88 updated_by varchar(255),
89 updated_timestamp datetime(6) not null,
90 dcae_deployment_id varchar(255),
91 dcae_deployment_status_url varchar(255),
92 global_properties_json json,
93 last_computed_state varchar(255) not null,
94 svg_representation MEDIUMTEXT,
95 loop_template_name varchar(255) not null,
96 service_uuid varchar(255),
100 create table loops_to_microservicepolicies (
101 loop_name varchar(255) not null,
102 microservicepolicy_name varchar(255) not null,
103 primary key (loop_name, microservicepolicy_name)
106 create table looptemplates_to_loopelementmodels (
107 loop_element_model_name varchar(255) not null,
108 loop_template_name varchar(255) not null,
109 flow_order integer not null,
110 primary key (loop_element_model_name, loop_template_name)
113 create table micro_service_policies (
114 name varchar(255) not null,
115 created_by varchar(255),
116 created_timestamp datetime(6) not null,
117 updated_by varchar(255),
118 updated_timestamp datetime(6) not null,
119 configurations_json json,
120 json_representation json not null,
121 pdp_group varchar(255),
122 context varchar(255),
123 dcae_blueprint_id varchar(255),
124 dcae_deployment_id varchar(255),
125 dcae_deployment_status_url varchar(255),
126 device_type_scope varchar(255),
127 policy_model_type varchar(255) not null,
128 policy_tosca MEDIUMTEXT not null,
130 loop_element_model_id varchar(255),
134 create table operational_policies (
135 name varchar(255) not null,
136 created_by varchar(255),
137 created_timestamp datetime(6) not null,
138 updated_by varchar(255),
139 updated_timestamp datetime(6) not null,
140 configurations_json json,
141 json_representation json not null,
142 pdp_group varchar(255),
143 loop_element_model_id varchar(255),
144 loop_id varchar(255) not null,
145 policy_model_type varchar(255),
146 policy_model_version varchar(255),
150 create table policy_models (
151 policy_model_type varchar(255) not null,
152 version varchar(255) not null,
153 created_by varchar(255),
154 created_timestamp datetime(6) not null,
155 updated_by varchar(255),
156 updated_timestamp datetime(6) not null,
157 policy_acronym varchar(255),
158 policy_tosca MEDIUMTEXT,
159 primary key (policy_model_type, version)
162 create table services (
163 service_uuid varchar(255) not null,
164 name varchar(255) not null,
165 resource_details json,
166 service_details json,
167 version varchar(255),
168 primary key (service_uuid)
171 alter table dictionary_to_dictionaryelements
172 add constraint FK68hjjinnm8nte2owstd0xwp23
173 foreign key (dictionary_element_short_name)
174 references dictionary_elements (short_name);
176 alter table dictionary_to_dictionaryelements
177 add constraint FKtqfxg46gsxwlm2gkl6ne3cxfe
178 foreign key (dictionary_name)
179 references dictionary (name);
181 alter table loop_logs
182 add constraint FK1j0cda46aickcaoxqoo34khg2
183 foreign key (loop_id)
184 references loops (name);
186 alter table loop_templates
187 add constraint FKn692dk6281wvp1o95074uacn6
188 foreign key (service_uuid)
189 references services (service_uuid);
191 alter table loopelementmodels_to_policymodels
192 add constraint FK23j2q74v6kaexefy0tdabsnda
193 foreign key (policy_model_type, policy_model_version)
194 references policy_models (policy_model_type, version);
196 alter table loopelementmodels_to_policymodels
197 add constraint FKjag1iu0olojfwryfkvb5o0rk5
198 foreign key (loop_element_name)
199 references loop_element_models (name);
202 add constraint FK844uwy82wt0l66jljkjqembpj
203 foreign key (loop_template_name)
204 references loop_templates (name);
207 add constraint FK4b9wnqopxogwek014i1shqw7w
208 foreign key (service_uuid)
209 references services (service_uuid);
211 alter table loops_to_microservicepolicies
212 add constraint FKle255jmi7b065fwbvmwbiehtb
213 foreign key (microservicepolicy_name)
214 references micro_service_policies (name);
216 alter table loops_to_microservicepolicies
217 add constraint FK8avfqaf7xl71l7sn7a5eri68d
218 foreign key (loop_name)
219 references loops (name);
221 alter table looptemplates_to_loopelementmodels
222 add constraint FK1k7nbrbugvqa0xfxkq3cj1yn9
223 foreign key (loop_element_model_name)
224 references loop_element_models (name);
226 alter table looptemplates_to_loopelementmodels
227 add constraint FKj29yxyw0x7ue6mwgi6d3qg748
228 foreign key (loop_template_name)
229 references loop_templates (name);
231 alter table micro_service_policies
232 add constraint FKqvvdypacbww07fuv8xvlvdjgl
233 foreign key (loop_element_model_id)
234 references loop_element_models (name);
236 alter table operational_policies
237 add constraint FKi9kh7my40737xeuaye9xwbnko
238 foreign key (loop_element_model_id)
239 references loop_element_models (name);
241 alter table operational_policies
242 add constraint FK1ddoggk9ni2bnqighv6ecmuwu
243 foreign key (loop_id)
244 references loops (name);
246 alter table operational_policies
247 add constraint FKlsyhfkoqvkwj78ofepxhoctip
248 foreign key (policy_model_type, policy_model_version)
249 references policy_models (policy_model_type, version);