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 MEDIUMTEXT not null,
40 dcae_blueprint_id varchar(255),
41 loop_element_type varchar(255) not null,
45 create table loop_logs (
47 log_component varchar(255) not null,
48 log_instant datetime(6) not null,
49 log_type varchar(255) not null,
50 message MEDIUMTEXT not null,
51 loop_id varchar(255) not null,
55 create table loop_templates (
56 name varchar(255) not null,
57 created_by varchar(255),
58 created_timestamp datetime(6) not null,
59 updated_by varchar(255),
60 updated_timestamp datetime(6) not null,
61 blueprint_yaml MEDIUMTEXT,
62 dcae_blueprint_id varchar(255),
63 maximum_instances_allowed integer,
64 svg_representation MEDIUMTEXT,
65 unique_blueprint boolean default false,
66 service_uuid varchar(255),
70 create table loopelementmodels_to_policymodels (
71 loop_element_name varchar(255) not null,
72 policy_model_type varchar(255) not null,
73 policy_model_version varchar(255) not null,
74 primary key (loop_element_name, policy_model_type, policy_model_version)
78 name varchar(255) not null,
79 created_by varchar(255),
80 created_timestamp datetime(6) not null,
81 updated_by varchar(255),
82 updated_timestamp datetime(6) not null,
83 dcae_deployment_id varchar(255),
84 dcae_deployment_status_url varchar(255),
85 global_properties_json json,
86 last_computed_state varchar(255) not null,
87 svg_representation MEDIUMTEXT,
88 loop_template_name varchar(255) not null,
89 service_uuid varchar(255),
93 create table loops_to_microservicepolicies (
94 loop_name varchar(255) not null,
95 microservicepolicy_name varchar(255) not null,
96 primary key (loop_name, microservicepolicy_name)
99 create table looptemplates_to_loopelementmodels (
100 loop_element_model_name varchar(255) not null,
101 loop_template_name varchar(255) not null,
102 flow_order integer not null,
103 primary key (loop_element_model_name, loop_template_name)
106 create table micro_service_policies (
107 name varchar(255) not null,
108 created_by varchar(255),
109 created_timestamp datetime(6) not null,
110 updated_by varchar(255),
111 updated_timestamp datetime(6) not null,
112 configurations_json json,
113 json_representation json not null,
114 pdp_group varchar(255),
115 context varchar(255),
116 dcae_blueprint_id varchar(255),
117 dcae_deployment_id varchar(255),
118 dcae_deployment_status_url varchar(255),
119 device_type_scope varchar(255),
120 policy_model_type varchar(255) not null,
121 policy_tosca MEDIUMTEXT not null,
123 loop_element_model_id varchar(255),
127 create table operational_policies (
128 name varchar(255) not null,
129 created_by varchar(255),
130 created_timestamp datetime(6) not null,
131 updated_by varchar(255),
132 updated_timestamp datetime(6) not null,
133 configurations_json json,
134 json_representation json not null,
135 pdp_group varchar(255),
136 loop_element_model_id varchar(255),
137 loop_id varchar(255) not null,
138 policy_model_type varchar(255),
139 policy_model_version varchar(255),
143 create table policy_models (
144 policy_model_type varchar(255) not null,
145 version varchar(255) not null,
146 created_by varchar(255),
147 created_timestamp datetime(6) not null,
148 updated_by varchar(255),
149 updated_timestamp datetime(6) not null,
150 policy_acronym varchar(255),
151 policy_tosca MEDIUMTEXT,
152 primary key (policy_model_type, version)
155 create table services (
156 service_uuid varchar(255) not null,
157 name varchar(255) not null,
158 resource_details json,
159 service_details json,
160 version varchar(255),
161 primary key (service_uuid)
164 alter table dictionary_elements
165 add constraint UK_qxkrvsrhp26m60apfvxphpl3d unique (short_name);
167 alter table dictionary_elements
168 add constraint FKn87bpgpm9i56w7uko585rbkgn
169 foreign key (dictionary_id)
170 references dictionary (name);
172 alter table loop_logs
173 add constraint FK1j0cda46aickcaoxqoo34khg2
174 foreign key (loop_id)
175 references loops (name);
177 alter table loop_templates
178 add constraint FKn692dk6281wvp1o95074uacn6
179 foreign key (service_uuid)
180 references services (service_uuid);
182 alter table loopelementmodels_to_policymodels
183 add constraint FK23j2q74v6kaexefy0tdabsnda
184 foreign key (policy_model_type, policy_model_version)
185 references policy_models (policy_model_type, version);
187 alter table loopelementmodels_to_policymodels
188 add constraint FKjag1iu0olojfwryfkvb5o0rk5
189 foreign key (loop_element_name)
190 references loop_element_models (name);
193 add constraint FK844uwy82wt0l66jljkjqembpj
194 foreign key (loop_template_name)
195 references loop_templates (name);
198 add constraint FK4b9wnqopxogwek014i1shqw7w
199 foreign key (service_uuid)
200 references services (service_uuid);
202 alter table loops_to_microservicepolicies
203 add constraint FKle255jmi7b065fwbvmwbiehtb
204 foreign key (microservicepolicy_name)
205 references micro_service_policies (name);
207 alter table loops_to_microservicepolicies
208 add constraint FK8avfqaf7xl71l7sn7a5eri68d
209 foreign key (loop_name)
210 references loops (name);
212 alter table looptemplates_to_loopelementmodels
213 add constraint FK1k7nbrbugvqa0xfxkq3cj1yn9
214 foreign key (loop_element_model_name)
215 references loop_element_models (name);
217 alter table looptemplates_to_loopelementmodels
218 add constraint FKj29yxyw0x7ue6mwgi6d3qg748
219 foreign key (loop_template_name)
220 references loop_templates (name);
222 alter table micro_service_policies
223 add constraint FKqvvdypacbww07fuv8xvlvdjgl
224 foreign key (loop_element_model_id)
225 references loop_element_models (name);
227 alter table operational_policies
228 add constraint FKi9kh7my40737xeuaye9xwbnko
229 foreign key (loop_element_model_id)
230 references loop_element_models (name);
232 alter table operational_policies
233 add constraint FK1ddoggk9ni2bnqighv6ecmuwu
234 foreign key (loop_id)
235 references loops (name);
237 alter table operational_policies
238 add constraint FKlsyhfkoqvkwj78ofepxhoctip
239 foreign key (policy_model_type, policy_model_version)
240 references policy_models (policy_model_type, version);