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_component varchar(255) not null,
24 log_instant datetime(6) not null,
25 log_type varchar(255) not null,
26 message MEDIUMTEXT not null,
27 loop_id varchar(255) not null,
32 name varchar(255) not null,
33 blueprint_yaml MEDIUMTEXT not null,
34 dcae_blueprint_id varchar(255),
35 dcae_deployment_id varchar(255),
36 dcae_deployment_status_url varchar(255),
37 global_properties_json json,
38 last_computed_state varchar(255) not null,
39 model_properties_json json,
40 operational_policy_schema json,
41 svg_representation MEDIUMTEXT,
45 create table loops_microservicepolicies (
46 loop_id varchar(255) not null,
47 microservicepolicy_id varchar(255) not null,
48 primary key (loop_id, microservicepolicy_id)
51 create table micro_service_policies (
52 name varchar(255) not null,
53 json_representation json not null,
54 model_type varchar(255) not null,
55 policy_tosca MEDIUMTEXT not null,
61 create table operational_policies (
62 name varchar(255) not null,
63 configurations_json json,
64 loop_id varchar(255) not null,
69 add constraint FK1j0cda46aickcaoxqoo34khg2
71 references loops (name);
73 alter table loops_microservicepolicies
74 add constraint FKem7tp1cdlpwe28av7ef91j1yl
75 foreign key (microservicepolicy_id)
76 references micro_service_policies (name);
78 alter table loops_microservicepolicies
79 add constraint FKsvx91jekgdkfh34iaxtjfgebt
81 references loops (name);
83 alter table operational_policies
84 add constraint FK1ddoggk9ni2bnqighv6ecmuwu
86 references loops (name);