022a31132847cbb116059a690f02aa59d09db261
[policy/engine.git] / packages / base / src / files / install / mysql / data / 181002_upgrade_script.sql
1 -- ============LICENSE_START=======================================================
2 -- ONAP Policy Engine
3 -- ================================================================================
4 -- Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
5 -- ================================================================================
6 -- Licensed under the Apache License, Version 2.0 (the "License");
7 -- you may not use this file except in compliance with the License.
8 -- You may obtain a copy of the License at
9 --
10 --      http://www.apache.org/licenses/LICENSE-2.0
11 --
12 -- Unless required by applicable law or agreed to in writing, software
13 -- distributed under the License is distributed on an "AS IS" BASIS,
14 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 -- See the License for the specific language governing permissions and
16 -- limitations under the License.
17 -- ============LICENSE_END=========================================================
18 use onap_sdk;
19
20 SET FOREIGN_KEY_CHECKS=0;
21
22 alter table fn_function
23 add type VARCHAR(20) NOT NULL;
24
25 alter table fn_function
26 add action VARCHAR(20) NOT NULL;
27
28 ALTER TABLE fn_function
29 ADD CONSTRAINT function UNIQUE (FUNCTION_CD,TYPE,ACTION);
30
31 delete from fn_function where function_cd='1';
32
33 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_process';
34 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_map';
35 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_sample';
36 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_home';
37 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_customer';
38 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_reports';
39 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_admin';
40 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_feedback';
41 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_help';
42 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_logout';
43 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_notes';
44 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_ajax';
45 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_customer_create';
46 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_tab';
47 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_test';
48 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_task';
49 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_task_search';
50 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_profile';
51 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_profile_create';
52 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_profile_import';
53 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_hiveconfig';
54 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_hiveconfig_search';
55 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_hiveconfig_create';
56 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_doclib';
57 update fn_function set type = 'menu' , action = '*' where function_cd = 'doclib';
58 update fn_function set type = 'menu' , action = '*' where function_cd = 'doclib_admin';
59 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_concept';
60 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_itracker';
61 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_itracker_admin';
62 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_job';
63 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_job_create';
64 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_job_designer';
65 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_mapreduce';
66 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_mapreduce_create';
67 update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_mapreduce_search';
68 update fn_function set type = 'menu' , action = '*' where function_cd = 'view_reports';
69 update fn_function set type = 'url'  , action = '*' where function_cd = 'login';
70 update fn_function set type = 'url'  , action = '*' where function_cd = 'quantum_bd';
71     
72 commit;