Policy 1707 commit to LF
[policy/engine.git] / packages / base / src / files / install / mysql / data / 170204_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 set foreign_key_checks=0;
22 drop table if exists brmsgroup_info;
23 CREATE TABLE brmsgroup_info
24 (
25 controllerName VARCHAR(255) NOT NULL,
26 groupId VARCHAR(255) NOT NULL,
27 artifactId VARCHAR(255) NOT NULL,
28 version VARCHAR(45),
29 PRIMARY KEY (controllerName)
30 );
31 drop table if exists brmsgroup_policy;
32 CREATE TABLE brmsgroup_policy
33 (
34 policyName VARCHAR(255) NOT NULL,
35 controllerName VARCHAR(255) NOT NULL references brmsgroup_info(controllerName),
36 PRIMARY KEY(policyname)
37 );
38
39
40 Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (5002,'Policy Super Admin','Y',10);
41 Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (5003,'Policy Super Editor','Y',10);
42 Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (5004,'Policy Super Guest','Y',10);
43 Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (5005,'Policy Admin','Y',10);
44 Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (5006,'Policy Editor','Y',10);
45 Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (5007,'Policy Guest','Y',10);
46
47
48 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5002,'menu_policy');
49 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5002,'policy_admin');
50 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5002,'policy_dashboard');
51 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5002,'policy_editor');
52 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5002,'policy_roles');
53 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5002,'policy_pdp');
54 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5002,'policy_dictionary');
55 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5002,'policy_push');
56
57 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5003,'menu_policy');
58 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5003,'policy_dashboard');
59 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5003,'policy_editor');
60 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5003,'policy_pdp');
61 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5003,'policy_push');
62
63 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5004,'menu_policy');
64 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5004,'policy_dashboard');
65 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5004,'policy_editor');
66 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5004,'policy_pdp');
67
68 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5005,'menu_policy');
69 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5005,'policy_dashboard');
70 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5005,'policy_editor');
71 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5005,'policy_pdp');
72 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5005,'policy_dictionary');
73 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5005,'policy_push');
74
75 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5006,'menu_policy');
76 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5006,'policy_dashboard');
77 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5006,'policy_editor');
78 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5006,'policy_pdp');
79 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5006,'policy_push');
80
81 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5007,'menu_policy');
82 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5007,'policy_dashboard');
83 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5007,'policy_editor');
84 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (5007,'policy_pdp');
85
86 set foreign_key_checks=0;
87
88 commit;