[Policy-24,Policy-27] Resolved PushPolicy Issue
[policy/engine.git] / packages / base / src / files / install / mysql / data / 170701_upgrade_script.sql
1 /*-
2 * ============LICENSE_START=======================================================
3 * ECOMP Policy Engine
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *      http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20 use ecomp_sdk;
21
22 INSERT INTO policyeditorscopes (`id`, `scopename`, `created_date`, `created_by`, `modified_date`, `modified_by`) VALUES ('1', 'com', '2017-06-01 11:45:36', 'demo', '2017-06-01 11:45:36', 'demo');
23
24 alter table IntegrityAuditEntity modify jdbcUrl varchar(200) not null; 
25
26 alter table `ecomp_sdk`.`microservicemodels` 
27 add column `enumValues` longtext null default null after `version`, 
28 add column `annotation` longtext null after `enumValues`;
29
30 drop table if exists FWTag; 
31 CREATE TABLE FWTag(
32 Id int NOT NULL AUTO_INCREMENT,
33 tagName VARCHAR(45) NOT NULL,
34 description VARCHAR(1024),
35 tagValues VARCHAR(1024) NOT NULL,
36 CREATED_DATE TIMESTAMP NOT NULL default current_timestamp,
37 CREATED_BY VARCHAR(45) NOT NULL,
38 MODIFIED_DATE TIMESTAMP NOT NULL,
39 MODIFIED_BY VARCHAR(45) NOT NULL,
40 PRIMARY KEY(ID)
41 );
42
43 drop table if exists FWTagPicker; 
44 CREATE TABLE FWTagPicker(
45 ID INT NOT NULL AUTO_INCREMENT,
46 tagPickerName VARCHAR(45) NOT NULL,
47 DESCRIPTION VARCHAR(1024),
48 tags VARCHAR(1024) NOT NULL,
49 networkRole varchar(64),
50 CREATED_DATE TIMESTAMP NOT NULL default current_timestamp,
51 CREATED_BY VARCHAR(45) NOT NULL,
52 MODIFIED_DATE TIMESTAMP NOT NULL,
53 MODIFIED_BY VARCHAR(45) NOT NULL,
54 PRIMARY KEY(ID)
55 );
56
57 drop table if exists brmsdependency;
58 CREATE TABLE brmsdependency (
59 id int not null auto_increment,
60 dependency_name varchar(1024) not null,
61 description varchar(1024),
62 created_by varchar(45) not null,
63 created_date timestamp not null default current_timestamp,
64 modified_by varchar(45),
65 modified_date timestamp,
66 dependency longtext not null,
67 primary key(id)
68 );
69
70 drop table if exists brmscontroller;
71 CREATE TABLE brmscontroller (
72 id int not null auto_increment,
73 controller_name varchar(1024) not null,
74 description varchar(1024),
75 created_by varchar(45) not null,
76 created_date timestamp not null default current_timestamp,
77 modified_by varchar(45),
78 modified_date timestamp,
79 controller longtext not null,
80 primary key(id)
81 );
82
83 drop table if exists microserviceattribute; 
84 CREATE TABLE microserviceattribute(
85 ID INT NOT NULL AUTO_INCREMENT,
86 name VARCHAR(255) NOT NULL,
87 value VARCHAR(1024),
88 modelName VARCHAR(1024) NOT NULL,
89 PRIMARY KEY(ID)
90 );