Fixed incorrect model name
[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 INSERT INTO `onap_sdk`.`microservicemodels` (`modelname`, `description`, `dependency`, `imported_by`, `attributes`, `ref_attributes`, `sub_attributes`, `version`, `enumValues`, `dataOrderInfo`, `annotation`) 
73 VALUES ('SDNC-GenerateName', 'SRIOV 1806 Model', '[]', 'demo', 'policy-instance-name=string:defaultValue-null:required-null:MANY-false:description-null', 'naming-models=naming-model-entity:MANY-true:description-null,', '{"naming-property":{"property-value":"string:defaultValue-null:required-false:MANY-false:description-null","property-operation":"string:defaultValue-null:required-false:MANY-false:description-null","source-endpoint":"string:defaultValue-null:required-false:MANY-false:description-null","property-name":"string:defaultValue-null:required-true:MANY-false:description-null","increment-sequence":"increment-sequence:required-false:MANY-false:description-null","source-system":"string:defaultValue-null:required-false:MANY-false:description-null"},"increment-sequence":{"max":"string:defaultValue-null:required-false:MANY-false:description-null","scope":"SCOPE:defaultValue-null:required-true:MANY-false:description-null","start-value":"string:defaultValue-null:required-true:MANY-false:description-null","length":"integer:defaultValue-null:required-true:MANY-false:description-null","increment":"string:defaultValue-null:required-true:MANY-false:description-null","sequence-type":"string:defaultValue-null:required-false:MANY-false:description-null"},"naming-model-entity":{"naming-properties":"naming-property:required-true:MANY-true:description-null","name-operation":"string:defaultValue-null:required-false:MANY-false:description-null","naming-type":"string:defaultValue-null:required-true:MANY-false:description-null","nfRole":"string:defaultValue-null:required-false:MANY-false:description-null","naming-recipe":"String:defaultValue-null:required-true:MANY-false:description-null"}}', 'CSIT', 'SCOPE=[CLOUD_REGION_ID,LOCATION_CLLI,VNF,VM,VFMODULE,PRECEEDING,TRAILING,ENTIRETY,]', '\"[policy-instance-name,naming-models,nfRole,naming-type,naming-recipe,name-operation,naming-properties,property-name,property-value,property-operation,source-system,source-endpoint,increment-sequence,scope,sequence-type,start-value,max,increment,length]\"','naming-type=matching-true, nfRole=matching-true, property-name=matching-true');
74
75 commit;