1 /* Copyright © 2019 AT&T
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
15 create table hibernate_sequence (
19 insert into hibernate_sequence values ( 1 );
21 create table loop_logs (
23 log_instant datetime(6) not null,
24 log_type varchar(255) not null,
25 message varchar(255) not null,
26 loop_id varchar(255) not null,
31 name varchar(255) not null,
32 blueprint_yaml MEDIUMTEXT not null,
33 dcae_blueprint_id varchar(255),
34 dcae_deployment_id varchar(255),
35 dcae_deployment_status_url varchar(255),
36 global_properties_json json,
37 last_computed_state varchar(255) not null,
38 model_properties_json json,
39 svg_representation MEDIUMTEXT,
43 create table loops_microservicepolicies (
44 loop_id varchar(255) not null,
45 microservicepolicy_id varchar(255) not null,
46 primary key (loop_id, microservicepolicy_id)
49 create table micro_service_policies (
50 name varchar(255) not null,
51 json_representation json not null,
52 model_type varchar(255) not null,
53 policy_tosca MEDIUMTEXT not null,
59 create table operational_policies (
60 name varchar(255) not null,
61 configurations_json json,
62 loop_id varchar(255) not null,
67 add constraint FK1j0cda46aickcaoxqoo34khg2
69 references loops (name);
71 alter table loops_microservicepolicies
72 add constraint FKem7tp1cdlpwe28av7ef91j1yl
73 foreign key (microservicepolicy_id)
74 references micro_service_policies (name);
76 alter table loops_microservicepolicies
77 add constraint FKsvx91jekgdkfh34iaxtjfgebt
79 references loops (name);
81 alter table operational_policies
82 add constraint FK1ddoggk9ni2bnqighv6ecmuwu
84 references loops (name);