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 service_uuid varchar(255),
69 create table loopelementmodels_to_policymodels (
70 loop_element_name varchar(255) not null,
71 policy_model_type varchar(255) not null,
72 policy_model_version varchar(255) not null,
73 primary key (loop_element_name, policy_model_type, policy_model_version)
77 name varchar(255) not null,
78 created_by varchar(255),
79 created_timestamp datetime(6) not null,
80 updated_by varchar(255),
81 updated_timestamp datetime(6) not null,
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_blueprint_id varchar(255),
116 dcae_deployment_id varchar(255),
117 dcae_deployment_status_url varchar(255),
118 device_type_scope varchar(255),
119 policy_model_type varchar(255) not null,
120 policy_tosca MEDIUMTEXT not null,
122 loop_element_model_id varchar(255),
126 create table operational_policies (
127 name varchar(255) not null,
128 created_by varchar(255),
129 created_timestamp datetime(6) not null,
130 updated_by varchar(255),
131 updated_timestamp datetime(6) not null,
132 configurations_json json,
133 json_representation json not null,
134 pdp_group varchar(255),
135 loop_element_model_id varchar(255),
136 loop_id varchar(255) not null,
137 policy_model_type varchar(255),
138 policy_model_version varchar(255),
142 create table policy_models (
143 policy_model_type varchar(255) not null,
144 version varchar(255) not null,
145 created_by varchar(255),
146 created_timestamp datetime(6) not null,
147 updated_by varchar(255),
148 updated_timestamp datetime(6) not null,
149 policy_acronym varchar(255),
150 policy_tosca MEDIUMTEXT,
151 primary key (policy_model_type, version)
154 create table services (
155 service_uuid varchar(255) not null,
156 name varchar(255) not null,
157 resource_details json,
158 service_details json,
159 version varchar(255),
160 primary key (service_uuid)
163 alter table dictionary_elements
164 add constraint UK_qxkrvsrhp26m60apfvxphpl3d unique (short_name);
166 alter table dictionary_elements
167 add constraint FKn87bpgpm9i56w7uko585rbkgn
168 foreign key (dictionary_id)
169 references dictionary (name);
171 alter table loop_logs
172 add constraint FK1j0cda46aickcaoxqoo34khg2
173 foreign key (loop_id)
174 references loops (name);
176 alter table loop_templates
177 add constraint FKn692dk6281wvp1o95074uacn6
178 foreign key (service_uuid)
179 references services (service_uuid);
181 alter table loopelementmodels_to_policymodels
182 add constraint FK23j2q74v6kaexefy0tdabsnda
183 foreign key (policy_model_type, policy_model_version)
184 references policy_models (policy_model_type, version);
186 alter table loopelementmodels_to_policymodels
187 add constraint FKjag1iu0olojfwryfkvb5o0rk5
188 foreign key (loop_element_name)
189 references loop_element_models (name);
192 add constraint FK844uwy82wt0l66jljkjqembpj
193 foreign key (loop_template_name)
194 references loop_templates (name);
197 add constraint FK4b9wnqopxogwek014i1shqw7w
198 foreign key (service_uuid)
199 references services (service_uuid);
201 alter table loops_to_microservicepolicies
202 add constraint FKle255jmi7b065fwbvmwbiehtb
203 foreign key (microservicepolicy_name)
204 references micro_service_policies (name);
206 alter table loops_to_microservicepolicies
207 add constraint FK8avfqaf7xl71l7sn7a5eri68d
208 foreign key (loop_name)
209 references loops (name);
211 alter table looptemplates_to_loopelementmodels
212 add constraint FK1k7nbrbugvqa0xfxkq3cj1yn9
213 foreign key (loop_element_model_name)
214 references loop_element_models (name);
216 alter table looptemplates_to_loopelementmodels
217 add constraint FKj29yxyw0x7ue6mwgi6d3qg748
218 foreign key (loop_template_name)
219 references loop_templates (name);
221 alter table micro_service_policies
222 add constraint FKqvvdypacbww07fuv8xvlvdjgl
223 foreign key (loop_element_model_id)
224 references loop_element_models (name);
226 alter table operational_policies
227 add constraint FKi9kh7my40737xeuaye9xwbnko
228 foreign key (loop_element_model_id)
229 references loop_element_models (name);
231 alter table operational_policies
232 add constraint FK1ddoggk9ni2bnqighv6ecmuwu
233 foreign key (loop_id)
234 references loops (name);
236 alter table operational_policies
237 add constraint FKlsyhfkoqvkwj78ofepxhoctip
238 foreign key (policy_model_type, policy_model_version)
239 references policy_models (policy_model_type, version);