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_logs (
35 log_component varchar(255) not null,
36 log_instant datetime(6) not null,
37 log_type varchar(255) not null,
38 message MEDIUMTEXT not null,
39 loop_id varchar(255) not null,
43 create table loop_templates (
44 name varchar(255) not null,
45 created_by varchar(255),
46 created_timestamp datetime(6) not null,
47 updated_by varchar(255),
48 updated_timestamp datetime(6) not null,
49 blueprint_yaml MEDIUMTEXT not null,
50 maximum_instances_allowed integer,
51 svg_representation MEDIUMTEXT,
52 service_uuid varchar(255),
57 name varchar(255) not null,
58 created_by varchar(255),
59 created_timestamp datetime(6) not null,
60 updated_by varchar(255),
61 updated_timestamp datetime(6) not null,
62 blueprint_yaml MEDIUMTEXT not null,
63 dcae_blueprint_id varchar(255),
64 dcae_deployment_id varchar(255),
65 dcae_deployment_status_url varchar(255),
66 global_properties_json json,
67 last_computed_state varchar(255) not null,
68 svg_representation MEDIUMTEXT,
69 loop_template_name varchar(255),
70 service_uuid varchar(255),
74 create table loops_microservicepolicies (
75 loop_id varchar(255) not null,
76 microservicepolicy_id varchar(255) not null,
77 primary key (loop_id, microservicepolicy_id)
80 create table micro_service_models (
81 name varchar(255) not null,
82 created_by varchar(255),
83 created_timestamp datetime(6) not null,
84 updated_by varchar(255),
85 updated_timestamp datetime(6) not null,
86 blueprint_yaml varchar(255) not null,
87 policy_type varchar(255) not null,
88 policy_model_type varchar(255),
89 policy_model_version varchar(255),
93 create table micro_service_policies (
94 name varchar(255) not null,
95 created_by varchar(255),
96 created_timestamp datetime(6) not null,
97 updated_by varchar(255),
98 updated_timestamp datetime(6) not null,
100 device_type_scope varchar(255),
101 json_representation json not null,
102 policy_model_type varchar(255) not null,
103 policy_tosca MEDIUMTEXT not null,
106 micro_service_model_id varchar(255),
110 create table operational_policies (
111 name varchar(255) not null,
112 configurations_json json,
113 json_representation json not null,
114 loop_id varchar(255) not null,
115 policy_model_type varchar(255),
116 policy_model_version varchar(255),
120 create table policy_models (
121 policy_model_type varchar(255) not null,
122 version varchar(255) not null,
123 created_by varchar(255),
124 created_timestamp datetime(6) not null,
125 updated_by varchar(255),
126 updated_timestamp datetime(6) not null,
127 policy_acronym varchar(255),
128 policy_tosca MEDIUMTEXT,
129 policy_variant varchar(255),
130 primary key (policy_model_type, version)
133 create table services (
134 service_uuid varchar(255) not null,
135 name varchar(255) not null,
136 resource_details json,
137 service_details json,
138 version varchar(255),
139 primary key (service_uuid)
142 create table templates_microservicemodels (
143 loop_template_name varchar(255) not null,
144 micro_service_model_name varchar(255) not null,
145 flow_order integer not null,
146 primary key (loop_template_name, micro_service_model_name)
149 alter table dictionary_elements
150 add constraint UK_qxkrvsrhp26m60apfvxphpl3d unique (short_name);
152 alter table dictionary_elements
153 add constraint FKn87bpgpm9i56w7uko585rbkgn
154 foreign key (dictionary_id)
155 references dictionary (name);
157 alter table loop_logs
158 add constraint FK1j0cda46aickcaoxqoo34khg2
159 foreign key (loop_id)
160 references loops (name);
162 alter table loop_templates
163 add constraint FKn692dk6281wvp1o95074uacn6
164 foreign key (service_uuid)
165 references services (service_uuid);
168 add constraint FK844uwy82wt0l66jljkjqembpj
169 foreign key (loop_template_name)
170 references loop_templates (name);
173 add constraint FK4b9wnqopxogwek014i1shqw7w
174 foreign key (service_uuid)
175 references services (service_uuid);
177 alter table loops_microservicepolicies
178 add constraint FKem7tp1cdlpwe28av7ef91j1yl
179 foreign key (microservicepolicy_id)
180 references micro_service_policies (name);
182 alter table loops_microservicepolicies
183 add constraint FKsvx91jekgdkfh34iaxtjfgebt
184 foreign key (loop_id)
185 references loops (name);
187 alter table micro_service_models
188 add constraint FKlkcffpnuavcg65u5o4tr66902
189 foreign key (policy_model_type, policy_model_version)
190 references policy_models (policy_model_type, version);
192 alter table micro_service_policies
193 add constraint FK5p7lipy9m2v7d4n3fvlclwse
194 foreign key (micro_service_model_id)
195 references micro_service_models (name);
197 alter table operational_policies
198 add constraint FK1ddoggk9ni2bnqighv6ecmuwu
199 foreign key (loop_id)
200 references loops (name);
202 alter table operational_policies
203 add constraint FKlsyhfkoqvkwj78ofepxhoctip
204 foreign key (policy_model_type, policy_model_version)
205 references policy_models (policy_model_type, version);
207 alter table templates_microservicemodels
208 add constraint FKq2gqg5q9jrkx8voosn7x5plqo
209 foreign key (loop_template_name)
210 references loop_templates (name);
212 alter table templates_microservicemodels
213 add constraint FKphn3m81suxavmj9c4u06cchju
214 foreign key (micro_service_model_name)
215 references micro_service_models (name);