This is an automated email from the ASF dual-hosted git repository.

bpatel pushed a commit to branch ranger-2.5
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/ranger-2.5 by this push:
     new 2bb5644dc RANGER-4885: db patched to add columns 
x_access_type_def.category column, x_security_zone.gz_jsondata
2bb5644dc is described below

commit 2bb5644dcf2e4ff00e76a2d320a705785de6ce6b
Author: Madhan Neethiraj <[email protected]>
AuthorDate: Thu Aug 1 13:31:15 2024 -0700

    RANGER-4885: db patched to add columns x_access_type_def.category column, 
x_security_zone.gz_jsondata
---
 .../optimized/current/ranger_core_db_mysql.sql     | 21 ++++++++----
 .../db/mysql/patches/068-create-view-principal.sql | 18 ++++++++++
 .../patches/069-add-gz_json_x_security_zone.sql    | 31 +++++++++++++++++
 .../mysql/patches/072-alter-x_access_type_def.sql  | 31 +++++++++++++++++
 .../optimized/current/ranger_core_db_oracle.sql    | 23 ++++++++++---
 .../oracle/patches/068-create-view-principal.sql   | 23 +++++++++++++
 .../patches/069-add-gz_json_x_security_zone.sql    | 25 ++++++++++++++
 .../oracle/patches/072-alter-x_access_type_def.sql | 24 +++++++++++++
 ..._trx_log_v2.sql => 073-create-x_trx_log_v2.sql} |  0
 .../optimized/current/ranger_core_db_postgres.sql  | 24 ++++++++-----
 .../postgres/patches/068-create-view-principal.sql | 17 ++++++++++
 .../patches/069-add-gz_json_x_security_zone.sql    | 39 ++++++++++++++++++++++
 .../patches/072-alter-x_access_type_def.sql        | 39 ++++++++++++++++++++++
 .../current/ranger_core_db_sqlanywhere.sql         | 28 +++++++++++++---
 .../patches/068-create-view-principal.sql          | 25 ++++++++++++++
 .../patches/069-add-gz_json_x_security_zone.sql    | 21 ++++++++++++
 .../patches/072-alter-x_access_type_def.sql        | 20 +++++++++++
 ..._trx_log_v2.sql => 073-create-x_trx_log_v2.sql} |  0
 .../optimized/current/ranger_core_db_sqlserver.sql | 29 +++++++++++++---
 .../patches/068-create-view-principal.sql          | 33 ++++++++++++++++++
 .../patches/069-add-gz_json_x_security_zone.sql    | 23 +++++++++++++
 .../patches/072-alter-x_access_type_def.sql        | 22 ++++++++++++
 ..._trx_log_v2.sql => 073-create-x_trx_log_v2.sql} |  0
 23 files changed, 486 insertions(+), 30 deletions(-)

diff --git a/security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
b/security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql
index deecac27e..de262ef80 100644
--- a/security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql
+++ b/security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql
@@ -1601,8 +1601,6 @@ CREATE INDEX x_policy_label_label_id ON 
x_policy_label(id);
 CREATE INDEX x_policy_label_label_name ON x_policy_label(label_name);
 CREATE INDEX x_policy_label_label_map_id ON x_policy_label_map(id);
 
-CREATE VIEW vx_principal as (SELECT u.user_name AS principal_name, 0 AS 
principal_type, u.status status, u.is_visible is_visible, u.other_attributes 
other_attributes, u.create_time create_time, u.update_time update_time, 
u.added_by_id added_by_id, u.upd_by_id upd_by_id FROM x_user u) UNION (SELECT 
g.group_name principal_name, 1 AS principal_type, g.status status, g.is_visible 
is_visible, g.other_attributes other_attributes, g.create_time create_time, 
g.update_time update_time, g.added_by [...]
-
 DELIMITER $$
 DROP PROCEDURE if exists getXportalUIdByLoginId$$
 CREATE PROCEDURE `getXportalUIdByLoginId`(IN input_val VARCHAR(100), OUT myid 
BIGINT)
@@ -1686,6 +1684,11 @@ CREATE TABLE `x_rms_mapping_provider` (
   UNIQUE KEY `x_rms_mapping_provider_UK_name` (`name`)
 );
 
+CREATE VIEW vx_principal as
+  (SELECT u.user_name AS principal_name, 0 AS principal_type, u.status status, 
u.is_visible is_visible, u.other_attributes other_attributes, u.create_time 
create_time, u.update_time update_time, u.added_by_id added_by_id, u.upd_by_id 
upd_by_id FROM x_user u) UNION
+  (SELECT g.group_name principal_name, 1 AS principal_type, g.status status, 
g.is_visible is_visible, g.other_attributes other_attributes, g.create_time 
create_time, g.update_time update_time, g.added_by_id added_by_id, g.upd_by_id 
upd_by_id FROM x_group g) UNION
+  (SELECT r.name principal_name, 2 AS principal_name, 1 status, 1 is_visible, 
null other_attributes, r.create_time create_time, r.update_time update_time, 
r.added_by_id added_by_id, r.upd_by_id upd_by_id FROM x_role r);
+
 
 DELIMITER $$
 DROP PROCEDURE if exists insertRangerPrerequisiteEntries $$
@@ -1826,7 +1829,11 @@ INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('059',UTC_TIMESTAMP(),'Ranger 1.0.0',UTC_TIMESTAMP(),'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('060',UTC_TIMESTAMP(),'Ranger 1.0.0',UTC_TIMESTAMP(),'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('065',UTC_TIMESTAMP(),'Ranger 1.0.0',UTC_TIMESTAMP(),'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('066',UTC_TIMESTAMP(),'Ranger 3.0.0',UTC_TIMESTAMP(),'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('066',UTC_TIMESTAMP(),'Ranger 2.5.0',UTC_TIMESTAMP(),'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('068',UTC_TIMESTAMP(),'Ranger 2.5.0',UTC_TIMESTAMP(),'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('069',UTC_TIMESTAMP(),'Ranger 2.5.0',UTC_TIMESTAMP(),'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('072',UTC_TIMESTAMP(),'Ranger 2.5.0',UTC_TIMESTAMP(),'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('073',UTC_TIMESTAMP(),'Ranger 2.5.0',UTC_TIMESTAMP(),'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('DB_PATCHES',UTC_TIMESTAMP(),'Ranger 1.0.0',UTC_TIMESTAMP(),'localhost','Y');
 
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10001',UTC_TIMESTAMP(),'Ranger 1.0.0',UTC_TIMESTAMP(),'localhost','Y');
@@ -1874,8 +1881,8 @@ INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10054',UTC_TIMESTAMP(),'Ranger 3.0.0',UTC_TIMESTAMP(),'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10055',UTC_TIMESTAMP(),'Ranger 3.0.0',UTC_TIMESTAMP(),'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10056',UTC_TIMESTAMP(),'Ranger 3.0.0',UTC_TIMESTAMP(),'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10060',UTC_TIMESTAMP(),'Ranger 3.0.0',UTC_TIMESTAMP(),'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10061',UTC_TIMESTAMP(),'Ranger 3.0.0',UTC_TIMESTAMP(),'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10062',UTC_TIMESTAMP(),'Ranger 3.0.0',UTC_TIMESTAMP(),'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10063',UTC_TIMESTAMP(),'Ranger 3.0.0',UTC_TIMESTAMP(),'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10060',UTC_TIMESTAMP(),'Ranger 2.5.0',UTC_TIMESTAMP(),'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10061',UTC_TIMESTAMP(),'Ranger 2.5.0',UTC_TIMESTAMP(),'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10062',UTC_TIMESTAMP(),'Ranger 2.5.0',UTC_TIMESTAMP(),'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10063',UTC_TIMESTAMP(),'Ranger 2.5.0',UTC_TIMESTAMP(),'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('JAVA_PATCHES',UTC_TIMESTAMP(),'Ranger 1.0.0',UTC_TIMESTAMP(),'localhost','Y');
diff --git a/security-admin/db/mysql/patches/068-create-view-principal.sql 
b/security-admin/db/mysql/patches/068-create-view-principal.sql
new file mode 100644
index 000000000..687c9ffc3
--- /dev/null
+++ b/security-admin/db/mysql/patches/068-create-view-principal.sql
@@ -0,0 +1,18 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+DROP VIEW IF EXISTS `vx_principal`;
+
+CREATE VIEW vx_principal as (SELECT u.user_name AS principal_name, 0 AS 
principal_type, u.status status, u.is_visible is_visible, u.other_attributes 
other_attributes, u.create_time create_time, u.update_time update_time, 
u.added_by_id added_by_id, u.upd_by_id upd_by_id FROM x_user u) UNION (SELECT 
g.group_name principal_name, 1 AS principal_type, g.status status, g.is_visible 
is_visible, g.other_attributes other_attributes, g.create_time create_time, 
g.update_time update_time, g.added_by [...]
\ No newline at end of file
diff --git 
a/security-admin/db/mysql/patches/069-add-gz_json_x_security_zone.sql 
b/security-admin/db/mysql/patches/069-add-gz_json_x_security_zone.sql
new file mode 100644
index 000000000..52ae48eca
--- /dev/null
+++ b/security-admin/db/mysql/patches/069-add-gz_json_x_security_zone.sql
@@ -0,0 +1,31 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+drop procedure if exists add_gz_jsonData_x_security_zone;
+
+delimiter ;;
+create procedure add_gz_jsonData_x_security_zone() begin
+
+if not exists (select * from information_schema.columns where 
table_schema=database() and table_name = 'x_security_zone' and 
column_name='gz_jsonData') then
+        ALTER TABLE x_security_zone ADD gz_jsonData LONGBLOB NULL DEFAULT NULL;
+end if;
+
+end;;
+
+delimiter ;
+
+call add_gz_jsonData_x_security_zone();
+
+drop procedure if exists add_gz_jsonData_x_security_zone;
\ No newline at end of file
diff --git a/security-admin/db/mysql/patches/072-alter-x_access_type_def.sql 
b/security-admin/db/mysql/patches/072-alter-x_access_type_def.sql
new file mode 100644
index 000000000..90e2ed487
--- /dev/null
+++ b/security-admin/db/mysql/patches/072-alter-x_access_type_def.sql
@@ -0,0 +1,31 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+drop procedure if exists add_category_x_access_type_def;
+
+delimiter ;;
+create procedure add_category_x_access_type_def() begin
+
+if not exists (select * from information_schema.columns where 
table_schema=database() and table_name = 'x_access_type_def' and 
column_name='category') then
+        ALTER TABLE x_access_type_def ADD category smallint DEFAULT NULL;
+end if;
+
+end;;
+
+delimiter ;
+
+call add_category_x_access_type_def();
+
+drop procedure if exists add_category_x_access_type_def;
\ No newline at end of file
diff --git 
a/security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
b/security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql
index aa64b48e5..b9a591f81 100644
--- a/security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql
+++ b/security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql
@@ -203,6 +203,7 @@ BEGIN
 END;/
 /
 
+call spdropview('VX_PRINCIPAL');
 call spdroptable('X_RMS_MAPPING_PROVIDER');
 call spdroptable('X_RMS_RESOURCE_MAPPING');
 call spdroptable('X_RMS_NOTIFICATION');
@@ -671,6 +672,7 @@ upd_by_id NUMBER(20) DEFAULT NULL NULL,
 version NUMBER(20)  DEFAULT NULL NULL,
 name varchar(255) NOT NULL,
 jsonData CLOB DEFAULT NULL NULL,
+gz_jsondata BLOB DEFAULT NULL NULL,
 description VARCHAR(1024) DEFAULT NULL NULL,
 primary key (id),
 CONSTRAINT x_security_zone_UK_name UNIQUE(name),
@@ -875,6 +877,7 @@ item_id NUMBER(20) NOT NULL,
 name VARCHAR(1024) DEFAULT NULL NULL,
 label VARCHAR(1024) DEFAULT NULL NULL,
 rb_key_label VARCHAR(1024) DEFAULT NULL NULL,
+category NUMBER(6) DEFAULT NULL NULL,
 sort_order NUMBER(10) DEFAULT '0' NULL,
 datamask_options VARCHAR(1024) DEFAULT NULL NULL,
 rowfilter_options VARCHAR(1024) DEFAULT NULL NULL,
@@ -1897,6 +1900,12 @@ PRIMARY KEY (id),
 CONSTRAINT x_rms_map_provider_UK_name UNIQUE(name)
 );
 
+CREATE VIEW vx_principal as
+  (SELECT u.user_name AS principal_name, 0 AS principal_type, u.status status, 
u.is_visible is_visible, u.other_attributes other_attributes, u.create_time 
create_time, u.update_time update_time, u.added_by_id added_by_id, u.upd_by_id 
upd_by_id FROM x_user u) UNION
+  (SELECT g.group_name principal_name, 1 AS principal_type, g.status status, 
g.is_visible is_visible, g.other_attributes other_attributes, g.create_time 
create_time, g.update_time update_time, g.added_by_id added_by_id, g.upd_by_id 
upd_by_id FROM x_group g) UNION
+  (SELECT r.name principal_name, 2 AS principal_name, 1 status, 1 is_visible, 
null other_attributes, r.create_time create_time, r.update_time update_time, 
r.added_by_id added_by_id, r.upd_by_id upd_by_id FROM x_role r);
+commit;
+
 commit;
 
 insert into x_portal_user (id,CREATE_TIME, UPDATE_TIME,FIRST_NAME, LAST_NAME, 
PUB_SCR_NAME, LOGIN_ID, PASSWORD, EMAIL, STATUS) values 
(X_PORTAL_USER_SEQ.NEXTVAL, sys_extract_utc(systimestamp), 
sys_extract_utc(systimestamp), 'Admin', '', 'Admin', 'admin', 
'ceb4f32325eda6142bd65215f4c0f371', '', 1);
@@ -1980,7 +1989,11 @@ INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,act
 INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, '059',sys_extract_utc(systimestamp),'Ranger 
1.0.0',sys_extract_utc(systimestamp),'localhost','Y');
 INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, '060',sys_extract_utc(systimestamp),'Ranger 
1.0.0',sys_extract_utc(systimestamp),'localhost','Y');
 INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, '065',sys_extract_utc(systimestamp),'Ranger 
1.0.0',sys_extract_utc(systimestamp),'localhost','Y');
-INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, '066',sys_extract_utc(systimestamp),'Ranger 
3.0.0',sys_extract_utc(systimestamp),'localhost','Y');
+INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, '066',sys_extract_utc(systimestamp),'Ranger 
2.5.0',sys_extract_utc(systimestamp),'localhost','Y');
+INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, '068',sys_extract_utc(systimestamp),'Ranger 
2.5.0',sys_extract_utc(systimestamp),'localhost','Y');
+INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, '069',sys_extract_utc(systimestamp),'Ranger 
2.5.0',sys_extract_utc(systimestamp),'localhost','Y');
+INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, '072',sys_extract_utc(systimestamp),'Ranger 
2.5.0',sys_extract_utc(systimestamp),'localhost','Y');
+INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, '073',sys_extract_utc(systimestamp),'Ranger 
2.5.0',sys_extract_utc(systimestamp),'localhost','Y');
 INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval, 'DB_PATCHES',sys_extract_utc(systimestamp),'Ranger 
1.0.0',sys_extract_utc(systimestamp),'localhost','Y');
 
 INSERT INTO x_user_module_perm 
(id,user_id,module_id,create_time,update_time,added_by_id,upd_by_id,is_allowed) 
VALUES 
(X_USER_MODULE_PERM_SEQ.nextval,getXportalUIdByLoginId('admin'),getModulesIdByName('Reports'),sys_extract_utc(systimestamp),sys_extract_utc(systimestamp),getXportalUIdByLoginId('admin'),getXportalUIdByLoginId('admin'),1);
@@ -2056,9 +2069,9 @@ INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,act
 INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10054',sys_extract_utc(systimestamp),'Ranger 
3.0.0',sys_extract_utc(systimestamp),'localhost','Y');
 INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10055',sys_extract_utc(systimestamp),'Ranger 
3.0.0',sys_extract_utc(systimestamp),'localhost','Y');
 INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10056',sys_extract_utc(systimestamp),'Ranger 
3.0.0',sys_extract_utc(systimestamp),'localhost','Y');
-INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10060',sys_extract_utc(systimestamp),'Ranger 
3.0.0',sys_extract_utc(systimestamp),'localhost','Y');
-INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10061',sys_extract_utc(systimestamp),'Ranger 
3.0.0',sys_extract_utc(systimestamp),'localhost','Y');
-INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10062',sys_extract_utc(systimestamp),'Ranger 
3.0.0',sys_extract_utc(systimestamp),'localhost','Y');
-INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10063',sys_extract_utc(systimestamp),'Ranger 
3.0.0',sys_extract_utc(systimestamp),'localhost','Y');
+INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10060',sys_extract_utc(systimestamp),'Ranger 
2.5.0',sys_extract_utc(systimestamp),'localhost','Y');
+INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10061',sys_extract_utc(systimestamp),'Ranger 
2.5.0',sys_extract_utc(systimestamp),'localhost','Y');
+INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10062',sys_extract_utc(systimestamp),'Ranger 
2.5.0',sys_extract_utc(systimestamp),'localhost','Y');
+INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'J10063',sys_extract_utc(systimestamp),'Ranger 
2.5.0',sys_extract_utc(systimestamp),'localhost','Y');
 INSERT INTO x_db_version_h 
(id,version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
(X_DB_VERSION_H_SEQ.nextval,'JAVA_PATCHES',sys_extract_utc(systimestamp),'Ranger
 1.0.0',sys_extract_utc(systimestamp),'localhost','Y');
 commit;
diff --git a/security-admin/db/oracle/patches/068-create-view-principal.sql 
b/security-admin/db/oracle/patches/068-create-view-principal.sql
new file mode 100644
index 000000000..90ff1eb36
--- /dev/null
+++ b/security-admin/db/oracle/patches/068-create-view-principal.sql
@@ -0,0 +1,23 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+call spdropview('vx_principal');
+
+CREATE VIEW vx_principal as
+        (SELECT u.user_name AS principal_name, 0 AS principal_type, u.status 
status, u.is_visible is_visible, u.other_attributes other_attributes, 
u.create_time create_time, u.update_time update_time, u.added_by_id 
added_by_id, u.upd_by_id upd_by_id FROM x_user u) UNION
+        (SELECT g.group_name principal_name, 1 AS principal_type, g.status 
status, g.is_visible is_visible, g.other_attributes other_attributes, 
g.create_time create_time, g.update_time update_time, g.added_by_id 
added_by_id, g.upd_by_id upd_by_id FROM x_group g) UNION
+        (SELECT r.name principal_name, 2 AS principal_name, 1 status, 1 
is_visible, null other_attributes, r.create_time create_time, r.update_time 
update_time, r.added_by_id added_by_id, r.upd_by_id upd_by_id FROM x_role r);
+
+commit;
diff --git 
a/security-admin/db/oracle/patches/069-add-gz_json_x_security_zone.sql 
b/security-admin/db/oracle/patches/069-add-gz_json_x_security_zone.sql
new file mode 100644
index 000000000..d5cb47fa0
--- /dev/null
+++ b/security-admin/db/oracle/patches/069-add-gz_json_x_security_zone.sql
@@ -0,0 +1,25 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+DECLARE
+    v_count number:=0;
+BEGIN
+    select count(*) into v_count from user_tab_cols where 
lower(table_name)='x_security_zone' and lower(column_name)='gz_jsondata';
+    if (v_count = 0) then
+        execute immediate 'ALTER TABLE x_security_zone ADD gz_jsondata BLOB 
DEFAULT NULL NULL';
+    end if;
+
+    commit;
+END;/
diff --git a/security-admin/db/oracle/patches/072-alter-x_access_type_def.sql 
b/security-admin/db/oracle/patches/072-alter-x_access_type_def.sql
new file mode 100644
index 000000000..0a1c82e8a
--- /dev/null
+++ b/security-admin/db/oracle/patches/072-alter-x_access_type_def.sql
@@ -0,0 +1,24 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+DECLARE
+        v_count number:=0;
+BEGIN
+        select count(*) into v_count from user_tab_cols where 
table_name='X_ACCESS_TYPE_DEF' and column_name='CATEGORY';
+        if (v_count = 0) then
+                execute immediate 'ALTER TABLE x_access_type_def ADD category 
NUMBER(6) DEFAULT NULL';
+        end if;
+        commit;
+END;/
diff --git a/security-admin/db/oracle/patches/077-create-x_trx_log_v2.sql 
b/security-admin/db/oracle/patches/073-create-x_trx_log_v2.sql
similarity index 100%
rename from security-admin/db/oracle/patches/077-create-x_trx_log_v2.sql
rename to security-admin/db/oracle/patches/073-create-x_trx_log_v2.sql
diff --git 
a/security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
b/security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql
index 2eec8aafd..66cf32f38 100644
--- a/security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql
+++ b/security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql
@@ -13,6 +13,7 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
+DROP VIEW IF EXISTS vx_principal;
 DROP TABLE IF EXISTS x_rms_mapping_provider CASCADE;
 DROP TABLE IF EXISTS x_rms_resource_mapping CASCADE;
 DROP TABLE IF EXISTS x_rms_notification CASCADE;
@@ -1669,6 +1670,12 @@ CONSTRAINT x_rms_mapping_provider_UK_name UNIQUE(name)
 );
 commit;
 
+CREATE VIEW vx_principal as
+  (SELECT u.user_name AS principal_name, 0 AS principal_type, u.status status, 
u.is_visible is_visible, u.other_attributes other_attributes, u.create_time 
create_time, u.update_time update_time, u.added_by_id added_by_id, u.upd_by_id 
upd_by_id FROM x_user u) UNION
+  (SELECT g.group_name principal_name, 1 AS principal_type, g.status status, 
g.is_visible is_visible, g.other_attributes other_attributes, g.create_time 
create_time, g.update_time update_time, g.added_by_id added_by_id, g.upd_by_id 
upd_by_id FROM x_group g) UNION
+  (SELECT r.name principal_name, 2 AS principal_name, 1 status, 1 is_visible, 
null other_attributes, r.create_time create_time, r.update_time update_time, 
r.added_by_id added_by_id, r.upd_by_id upd_by_id FROM x_role r);
+commit;
+
 CREATE INDEX x_tag_change_log_IDX_service_id ON x_tag_change_log(service_id);
 CREATE INDEX x_tag_change_log_IDX_tag_version ON 
x_tag_change_log(service_tags_version);
 commit;
@@ -1912,7 +1919,11 @@ INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('059',current_timestamp,'Ranger 1.0.0',current_timestamp,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('060',current_timestamp,'Ranger 1.0.0',current_timestamp,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('065',current_timestamp,'Ranger 1.0.0',current_timestamp,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('066',current_timestamp,'Ranger 3.0.0',current_timestamp,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('066',current_timestamp,'Ranger 2.5.0',current_timestamp,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('068',current_timestamp,'Ranger 2.5.0',current_timestamp,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('069',current_timestamp,'Ranger 2.5.0',current_timestamp,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('072',current_timestamp,'Ranger 2.5.0',current_timestamp,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('073',current_timestamp,'Ranger 2.5.0',current_timestamp,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('DB_PATCHES',current_timestamp,'Ranger 
1.0.0',current_timestamp,'localhost','Y');
 
 INSERT INTO x_user_module_perm 
(user_id,module_id,create_time,update_time,added_by_id,upd_by_id,is_allowed) 
VALUES
@@ -2009,11 +2020,8 @@ INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10054',current_timestamp,'Ranger 3.0.0',current_timestamp,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10055',current_timestamp,'Ranger 3.0.0',current_timestamp,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10056',current_timestamp,'Ranger 3.0.0',current_timestamp,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10060',current_timestamp,'Ranger 3.0.0',current_timestamp,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10061',current_timestamp,'Ranger 3.0.0',current_timestamp,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10062',current_timestamp,'Ranger 3.0.0',current_timestamp,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10063',current_timestamp,'Ranger 3.0.0',current_timestamp,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10060',current_timestamp,'Ranger 2.5.0',current_timestamp,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10061',current_timestamp,'Ranger 2.5.0',current_timestamp,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10062',current_timestamp,'Ranger 2.5.0',current_timestamp,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10063',current_timestamp,'Ranger 2.5.0',current_timestamp,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('JAVA_PATCHES',current_timestamp,'Ranger 
1.0.0',current_timestamp,'localhost','Y');
-
-DROP VIEW IF EXISTS vx_principal;
-CREATE VIEW vx_principal as (SELECT u.user_name AS principal_name, 0 AS 
principal_type, u.status status, u.is_visible is_visible, u.other_attributes 
other_attributes, u.create_time create_time, u.update_time update_time, 
u.added_by_id added_by_id, u.upd_by_id upd_by_id FROM x_user u) UNION (SELECT 
g.group_name principal_name, 1 AS principal_type, g.status status, g.is_visible 
is_visible, g.other_attributes other_attributes, g.create_time create_time, 
g.update_time update_time, g.added_by [...]
diff --git a/security-admin/db/postgres/patches/068-create-view-principal.sql 
b/security-admin/db/postgres/patches/068-create-view-principal.sql
new file mode 100644
index 000000000..801de1096
--- /dev/null
+++ b/security-admin/db/postgres/patches/068-create-view-principal.sql
@@ -0,0 +1,17 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+DROP VIEW IF EXISTS vx_principal;
+CREATE VIEW vx_principal as (SELECT u.user_name AS principal_name, 0 AS 
principal_type, u.status status, u.is_visible is_visible, u.other_attributes 
other_attributes, u.create_time create_time, u.update_time update_time, 
u.added_by_id added_by_id, u.upd_by_id upd_by_id FROM x_user u) UNION (SELECT 
g.group_name principal_name, 1 AS principal_type, g.status status, g.is_visible 
is_visible, g.other_attributes other_attributes, g.create_time create_time, 
g.update_time update_time, g.added_by [...]
\ No newline at end of file
diff --git 
a/security-admin/db/postgres/patches/069-add-gz_json_x_security_zone.sql 
b/security-admin/db/postgres/patches/069-add-gz_json_x_security_zone.sql
new file mode 100644
index 000000000..b78c41549
--- /dev/null
+++ b/security-admin/db/postgres/patches/069-add-gz_json_x_security_zone.sql
@@ -0,0 +1,39 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+
+
+select 'delimiter start';
+CREATE OR REPLACE FUNCTION add_gz_jsonData_x_security_zone()
+RETURNS void AS $$
+DECLARE
+ v_column_exists integer := 0;
+BEGIN
+ select count(*) into v_column_exists from pg_attribute where attrelid 
in(select oid from pg_class where relname='x_security_zone') and 
attname='gz_jsonData';
+ IF v_column_exists = 0 THEN
+  ALTER TABLE x_security_zone ADD COLUMN gz_jsonData BYTEA NULL DEFAULT NULL;
+ END IF;
+
+END;
+$$ LANGUAGE plpgsql;
+select 'delimiter end';
+
+select add_gz_jsonData_x_security_zone();
+select 'delimiter end';
+commit;
+
+
+
+
diff --git a/security-admin/db/postgres/patches/072-alter-x_access_type_def.sql 
b/security-admin/db/postgres/patches/072-alter-x_access_type_def.sql
new file mode 100644
index 000000000..e22a5c700
--- /dev/null
+++ b/security-admin/db/postgres/patches/072-alter-x_access_type_def.sql
@@ -0,0 +1,39 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+
+
+select 'delimiter start';
+CREATE OR REPLACE FUNCTION add_category_x_access_type_def()
+RETURNS void AS $$
+DECLARE
+ v_column_exists integer := 0;
+BEGIN
+ select count(*) into v_column_exists from pg_attribute where attrelid 
in(select oid from pg_class where relname='x_access_type_def') and 
attname='category';
+ IF v_column_exists = 0 THEN
+  ALTER TABLE x_access_type_def ADD COLUMN category SMALLINT DEFAULT NULL NULL;
+ END IF;
+
+END;
+$$ LANGUAGE plpgsql;
+select 'delimiter end';
+
+select add_category_x_access_type_def();
+select 'delimiter end';
+commit;
+
+
+
+
diff --git 
a/security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
 
b/security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
index 1d276fb85..9918e5040 100644
--- 
a/security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
+++ 
b/security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
@@ -35,6 +35,8 @@ BEGIN
        execute(@drpstmt)
 END
 
+GO
+DROP VIEW IF EXISTS 'vx_principal';
 GO
 call dbo.removeForeignKeysAndTable('x_rms_mapping_provider')
 GO
@@ -530,6 +532,7 @@ CREATE TABLE dbo.x_security_zone(
        version bigint DEFAULT NULL NULL,
        name varchar(255) NOT NULL,
        jsonData text DEFAULT NULL NULL,
+       gz_jsonData long binary DEFAULT NULL NULL,
        description varchar(1024) DEFAULT NULL NULL,
        CONSTRAINT x_security_zone_PK_id PRIMARY KEY CLUSTERED(id),
        CONSTRAINT x_security_zone_UK_name UNIQUE NONCLUSTERED(name)
@@ -645,6 +648,7 @@ create table dbo.x_access_type_def (
        name varchar(1024) DEFAULT NULL NULL,
        label varchar(1024) DEFAULT NULL NULL,
        rb_key_label varchar(1024) DEFAULT NULL NULL,
+       category smallint DEFAULT NULL NULL,
        sort_order int DEFAULT 0 NULL,
        datamask_options VARCHAR(1024) DEFAULT NULL NULL,
        rowfilter_options VARCHAR(1024) DEFAULT NULL NULL,
@@ -2145,6 +2149,12 @@ CONSTRAINT x_rms_mapping_provider_UK_name UNIQUE(name)
 );
 GO
 
+CREATE VIEW dbo.vx_principal as
+  (SELECT u.user_name AS principal_name, 0 AS principal_type, u.status status, 
u.is_visible is_visible, u.other_attributes other_attributes, u.create_time 
create_time, u.update_time update_time, u.added_by_id added_by_id, u.upd_by_id 
upd_by_id FROM x_user u) UNION
+  (SELECT g.group_name principal_name, 1 AS principal_type, g.status status, 
g.is_visible is_visible, g.other_attributes other_attributes, g.create_time 
create_time, g.update_time update_time, g.added_by_id added_by_id, g.upd_by_id 
upd_by_id FROM x_group g) UNION
+  (SELECT r.name principal_name, 2 AS principal_name, 1 status, 1 is_visible, 
null other_attributes, r.create_time create_time, r.update_time update_time, 
r.added_by_id added_by_id, r.upd_by_id upd_by_id FROM x_role r);
+GO
+
 insert into x_portal_user 
(create_time,update_time,first_name,last_name,pub_scr_name,login_id,password,email,status)
 values 
(GETDATE(),GETDATE(),'Admin','','Admin','admin','ceb4f32325eda6142bd65215f4c0f371','',1)
 GO
 insert into x_portal_user_role 
(create_time,update_time,user_id,user_role,status) values 
(GETDATE(),GETDATE(),dbo.getXportalUIdByLoginId('admin'),'ROLE_SYS_ADMIN',1)
@@ -2277,7 +2287,15 @@ INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active
 GO
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('065',CURRENT_TIMESTAMP,'Ranger 1.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('066',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('066',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+GO
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('068',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+GO
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('069',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+GO
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('072',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+GO
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('073',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('DB_PATCHES',CURRENT_TIMESTAMP,'Ranger 
1.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
@@ -2424,13 +2442,13 @@ INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active
 GO
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10056',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10060',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10060',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10061',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10061',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10062',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10062',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10063',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10063',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('JAVA_PATCHES',CURRENT_TIMESTAMP,'Ranger 
1.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
diff --git 
a/security-admin/db/sqlanywhere/patches/068-create-view-principal.sql 
b/security-admin/db/sqlanywhere/patches/068-create-view-principal.sql
new file mode 100644
index 000000000..c8860eb44
--- /dev/null
+++ b/security-admin/db/sqlanywhere/patches/068-create-view-principal.sql
@@ -0,0 +1,25 @@
+-- Licensed to the Apache Software Foundation(ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+--(the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+DROP VIEW IF EXISTS dbo.vx_principal;
+GO
+
+CREATE VIEW dbo.vx_principal as
+        (SELECT u.user_name AS principal_name, 0 AS principal_type, u.status 
status, u.is_visible is_visible, u.other_attributes other_attributes, 
u.create_time create_time, u.update_time update_time, u.added_by_id 
added_by_id, u.upd_by_id upd_by_id FROM x_user u) UNION
+        (SELECT g.group_name principal_name, 1 AS principal_type, g.status 
status, g.is_visible is_visible, g.other_attributes other_attributes, 
g.create_time create_time, g.update_time update_time, g.added_by_id 
added_by_id, g.upd_by_id upd_by_id FROM x_group g) UNION
+        (SELECT r.name principal_name, 2 AS principal_name, 1 status, 1 
is_visible, null other_attributes, r.create_time create_time, r.update_time 
update_time, r.added_by_id added_by_id, r.upd_by_id upd_by_id FROM x_role r);
+GO
+
+EXIT
diff --git 
a/security-admin/db/sqlanywhere/patches/069-add-gz_json_x_security_zone.sql 
b/security-admin/db/sqlanywhere/patches/069-add-gz_json_x_security_zone.sql
new file mode 100644
index 000000000..f2b15fceb
--- /dev/null
+++ b/security-admin/db/sqlanywhere/patches/069-add-gz_json_x_security_zone.sql
@@ -0,0 +1,21 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+IF NOT EXISTS(select * from SYS.SYSCOLUMNS where tname = 'x_security_zone' and 
cname = 'gz_jsondata') THEN
+               ALTER TABLE dbo.x_security_zone ADD gz_jsondata long binary 
DEFAULT NULL NULL;
+END IF;
+GO
+
+exit
diff --git 
a/security-admin/db/sqlanywhere/patches/072-alter-x_access_type_def.sql 
b/security-admin/db/sqlanywhere/patches/072-alter-x_access_type_def.sql
new file mode 100644
index 000000000..0aff587c5
--- /dev/null
+++ b/security-admin/db/sqlanywhere/patches/072-alter-x_access_type_def.sql
@@ -0,0 +1,20 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+IF NOT EXISTS(select * from SYS.SYSCOLUMNS where tname = 'x_access_type_def' 
and cname = 'category') THEN
+                ALTER TABLE dbo.x_access_type_def ADD category smallint 
DEFAULT NULL;
+END IF;
+GO
+exit
diff --git a/security-admin/db/sqlanywhere/patches/067-create-x_trx_log_v2.sql 
b/security-admin/db/sqlanywhere/patches/073-create-x_trx_log_v2.sql
similarity index 100%
rename from security-admin/db/sqlanywhere/patches/067-create-x_trx_log_v2.sql
rename to security-admin/db/sqlanywhere/patches/073-create-x_trx_log_v2.sql
diff --git 
a/security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
b/security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql
index c49d4c09c..b44c683bf 100644
--- a/security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql
+++ b/security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql
@@ -13,6 +13,10 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
+IF (OBJECT_ID('vx_principal') IS NOT NULL)
+BEGIN
+    DROP VIEW [dbo].[vx_principal]
+END
 IF (OBJECT_ID('x_user_FK_upd_by_id') IS NOT NULL)
 BEGIN
     ALTER TABLE [dbo].[x_user] DROP CONSTRAINT x_user_FK_upd_by_id
@@ -1409,6 +1413,7 @@ CREATE TABLE [dbo].[x_security_zone](
        [version] [bigint] DEFAULT NULL NULL,
        [name] [varchar](255) NOT NULL,
        [jsonData] [nvarchar](max) DEFAULT NULL NULL,
+       [gz_jsondata] [varbinary](max) DEFAULT NULL NULL,
        [description] [varchar](1024) DEFAULT NULL NULL,
        PRIMARY KEY CLUSTERED
 (
@@ -1565,6 +1570,7 @@ CREATE TABLE [dbo].[x_access_type_def] (
         [name] [varchar](1024) DEFAULT NULL NULL,
         [label] [varchar](1024) DEFAULT NULL NULL,
         [rb_key_label] [varchar](1024) DEFAULT NULL NULL,
+        [category] [smallint] DEFAULT NULL NULL,
         [sort_order] [int] DEFAULT 0 NULL,
         [datamask_options] [varchar](1024) DEFAULT NULL NULL,
         [rowfilter_options] [varchar](1024) DEFAULT NULL NULL,
@@ -4070,6 +4076,15 @@ PRIMARY KEY CLUSTERED
 ) ON [PRIMARY]
 GO
 
+SET ANSI_NULLS ON
+SET QUOTED_IDENTIFIER ON
+SET ANSI_PADDING ON
+CREATE VIEW [dbo].[vx_principal] as
+  (SELECT u.user_name AS principal_name, 0 AS principal_type, u.status status, 
u.is_visible is_visible, u.other_attributes other_attributes, u.create_time 
create_time, u.update_time update_time, u.added_by_id added_by_id, u.upd_by_id 
upd_by_id FROM x_user u) UNION
+  (SELECT g.group_name principal_name, 1 AS principal_type, g.status status, 
g.is_visible is_visible, g.other_attributes other_attributes, g.create_time 
create_time, g.update_time update_time, g.added_by_id added_by_id, g.upd_by_id 
upd_by_id FROM x_group g) UNION
+  (SELECT r.name principal_name, 2 AS principal_name, 1 status, 1 is_visible, 
null other_attributes, r.create_time create_time, r.update_time update_time, 
r.added_by_id added_by_id, r.upd_by_id upd_by_id FROM x_role r)
+GO
+
 insert into x_portal_user 
(CREATE_TIME,UPDATE_TIME,FIRST_NAME,LAST_NAME,PUB_SCR_NAME,LOGIN_ID,PASSWORD,EMAIL,STATUS)
 values 
(CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,'Admin','','Admin','admin','ceb4f32325eda6142bd65215f4c0f371','',1);
 insert into x_portal_user_role 
(CREATE_TIME,UPDATE_TIME,USER_ID,USER_ROLE,STATUS) values 
(CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,dbo.getXportalUIdByLoginId('admin'),'ROLE_SYS_ADMIN',1);
 insert into x_user (CREATE_TIME,UPDATE_TIME,user_name,status,descr) values 
(CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,'admin',0,'Administrator');
@@ -4137,7 +4152,11 @@ INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('059',CURRENT_TIMESTAMP,'Ranger 1.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('060',CURRENT_TIMESTAMP,'Ranger 1.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('065',CURRENT_TIMESTAMP,'Ranger 1.0.0',CURRENT_TIMESTAMP,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('066',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('066',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('068',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('069',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('072',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('073',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('DB_PATCHES',CURRENT_TIMESTAMP,'Ranger 
1.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 INSERT INTO x_user_module_perm 
(user_id,module_id,create_time,update_time,added_by_id,upd_by_id,is_allowed) 
VALUES 
(dbo.getXportalUIdByLoginId('admin'),dbo.getModulesIdByName('Reports'),CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,dbo.getXportalUIdByLoginId('admin'),dbo.getXportalUIdByLoginId('admin'),1);
 INSERT INTO x_user_module_perm 
(user_id,module_id,create_time,update_time,added_by_id,upd_by_id,is_allowed) 
VALUES (dbo.getXportalUIdByLoginId('admin'),dbo.getModulesIdByName('Resource 
Based 
Policies'),CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,dbo.getXportalUIdByLoginId('admin'),dbo.getXportalUIdByLoginId('admin'),1);
@@ -4212,9 +4231,9 @@ INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10054',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10055',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10056',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10060',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10061',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10062',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
-INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10063',CURRENT_TIMESTAMP,'Ranger 3.0.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10060',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10061',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10062',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
+INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('J10063',CURRENT_TIMESTAMP,'Ranger 2.5.0',CURRENT_TIMESTAMP,'localhost','Y');
 INSERT INTO x_db_version_h 
(version,inst_at,inst_by,updated_at,updated_by,active) VALUES 
('JAVA_PATCHES',CURRENT_TIMESTAMP,'Ranger 
1.0.0',CURRENT_TIMESTAMP,'localhost','Y');
 GO
diff --git a/security-admin/db/sqlserver/patches/068-create-view-principal.sql 
b/security-admin/db/sqlserver/patches/068-create-view-principal.sql
new file mode 100644
index 000000000..80fd141ff
--- /dev/null
+++ b/security-admin/db/sqlserver/patches/068-create-view-principal.sql
@@ -0,0 +1,33 @@
+-- Licensed to the Apache Software Foundation(ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+--(the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+IF (OBJECT_ID('vx_principal') IS NOT NULL)
+BEGIN
+    DROP VIEW [dbo].[vx_principal]
+END
+GO
+
+SET ANSI_NULLS ON
+SET QUOTED_IDENTIFIER ON
+SET ANSI_PADDING ON
+GO
+
+CREATE VIEW [dbo].[vx_principal] as
+        (SELECT u.user_name AS principal_name, 0 AS principal_type, u.status 
status, u.is_visible is_visible, u.other_attributes other_attributes, 
u.create_time create_time, u.update_time update_time, u.added_by_id 
added_by_id, u.upd_by_id upd_by_id FROM x_user u) UNION
+       (SELECT g.group_name principal_name, 1 AS principal_type, g.status 
status, g.is_visible is_visible, g.other_attributes other_attributes, 
g.create_time create_time, g.update_time update_time, g.added_by_id 
added_by_id, g.upd_by_id upd_by_id FROM x_group g) UNION
+       (SELECT r.name principal_name, 2 AS principal_name, 1 status, 1 
is_visible, null other_attributes, r.create_time create_time, r.update_time 
update_time, r.added_by_id added_by_id, r.upd_by_id upd_by_id FROM x_role r)
+GO
+
+exit
diff --git 
a/security-admin/db/sqlserver/patches/069-add-gz_json_x_security_zone.sql 
b/security-admin/db/sqlserver/patches/069-add-gz_json_x_security_zone.sql
new file mode 100644
index 000000000..f4b004439
--- /dev/null
+++ b/security-admin/db/sqlserver/patches/069-add-gz_json_x_security_zone.sql
@@ -0,0 +1,23 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+GO
+IF NOT EXISTS(select * from INFORMATION_SCHEMA.columns where table_name = 
'x_security_zone' and column_name = 'gz_jsondata')
+BEGIN
+       ALTER TABLE [dbo].[x_security_zone] ADD [gz_jsondata] [varbinary](max) 
DEFAULT NULL NULL;
+END
+GO
+
+exit
diff --git 
a/security-admin/db/sqlserver/patches/072-alter-x_access_type_def.sql 
b/security-admin/db/sqlserver/patches/072-alter-x_access_type_def.sql
new file mode 100644
index 000000000..52a289db7
--- /dev/null
+++ b/security-admin/db/sqlserver/patches/072-alter-x_access_type_def.sql
@@ -0,0 +1,22 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+GO
+IF NOT EXISTS(select * from INFORMATION_SCHEMA.columns where table_name = 
'x_access_type_def' and column_name = 'category')
+BEGIN
+        ALTER TABLE [dbo].[x_access_type_def] ADD [category] [smallint] 
DEFAULT NULL;
+END
+GO
+exit
diff --git a/security-admin/db/sqlserver/patches/067-create-x_trx_log_v2.sql 
b/security-admin/db/sqlserver/patches/073-create-x_trx_log_v2.sql
similarity index 100%
rename from security-admin/db/sqlserver/patches/067-create-x_trx_log_v2.sql
rename to security-admin/db/sqlserver/patches/073-create-x_trx_log_v2.sql

Reply via email to