ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject incubator-ranger git commit: RANGER-303:Consolidated DB schema after adding other DB, syncing tables and column sizes
Date Fri, 13 Mar 2015 19:24:30 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master 6e9f2a3b5 -> 23482defe


RANGER-303:Consolidated DB schema after adding other DB, syncing tables and column sizes


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/23482def
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/23482def
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/23482def

Branch: refs/heads/master
Commit: 23482defe710346dc0c833caeac927f8c241659d
Parents: 6e9f2a3
Author: Velmurugan Periasamy <vel@apache.org>
Authored: Fri Mar 13 15:23:31 2015 -0400
Committer: Velmurugan Periasamy <vel@apache.org>
Committed: Fri Mar 13 15:23:31 2015 -0400

----------------------------------------------------------------------
 .../db/mysql/patches/011-auditcolumnssize.sql   | 36 ++++++++++
 security-admin/db/mysql/xa_audit_db.sql         |  4 +-
 .../db/oracle/patches/009-updated_schema.sql    | 18 +++++
 .../patches/010-users-and-groups-visibility.sql |  6 +-
 .../db/oracle/patches/011-auditcolumnssize.sql  | 39 +++++++++++
 security-admin/db/oracle/xa_audit_db_oracle.sql |  4 +-
 .../db/postgres/xa_audit_db_postgres.sql        | 10 +--
 .../db/postgres/xa_core_db_postgres.sql         | 74 ++++++++++++--------
 .../db/sqlserver/xa_audit_db_sqlserver.sql      |  4 +-
 .../db/sqlserver/xa_core_db_sqlserver.sql       | 22 ++++--
 10 files changed, 168 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/mysql/patches/011-auditcolumnssize.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/mysql/patches/011-auditcolumnssize.sql b/security-admin/db/mysql/patches/011-auditcolumnssize.sql
new file mode 100644
index 0000000..b38ae8c
--- /dev/null
+++ b/security-admin/db/mysql/patches/011-auditcolumnssize.sql
@@ -0,0 +1,36 @@
+-- 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 increase_column_size_of_xa_access_audit_table;
+
+delimiter ;;
+create procedure increase_column_size_of_xa_access_audit_table() begin
+
+ /* change request_data data size from 2000 to 4000 */
+ if exists (select * from information_schema.columns where table_schema=database() and table_name
= 'xa_access_audit' and column_name = 'request_data' and data_type='varchar' and CHARACTER_MAXIMUM_LENGTH=2000)
then
+	ALTER TABLE  `xa_access_audit` CHANGE  `request_data`  `request_data` VARCHAR(4000) NULL
DEFAULT NULL ;
+ end if;
+
+ /* change resource_path data size from 2000 to 4000 */
+ if exists (select * from information_schema.columns where table_schema=database() and table_name
= 'xa_access_audit' and column_name = 'resource_path' and data_type='varchar' and CHARACTER_MAXIMUM_LENGTH=2000)
then
+	ALTER TABLE  `xa_access_audit` CHANGE  `resource_path`  `resource_path` VARCHAR(4000) NULL
DEFAULT NULL ;
+ end if;
+
+end;;
+
+delimiter ;
+call increase_column_size_of_xa_access_audit_table();
+
+drop procedure if exists increase_column_size_of_xa_access_audit_table;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/mysql/xa_audit_db.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/mysql/xa_audit_db.sql b/security-admin/db/mysql/xa_audit_db.sql
index dba98ce..163d7b6 100644
--- a/security-admin/db/mysql/xa_audit_db.sql
+++ b/security-admin/db/mysql/xa_audit_db.sql
@@ -58,8 +58,8 @@ CREATE TABLE `xa_access_audit` (
   `event_time` datetime DEFAULT NULL,
   `request_user` varchar(255) DEFAULT NULL,
   `action` varchar(2000) DEFAULT NULL,
-  `request_data` varchar(2000) DEFAULT NULL,
-  `resource_path` varchar(2000) DEFAULT NULL,
+  `request_data` varchar(4000) DEFAULT NULL,
+  `resource_path` varchar(4000) DEFAULT NULL,
   `resource_type` varchar(255) DEFAULT NULL,
   PRIMARY KEY (`id`),
   KEY `xa_access_audit_added_by_id` (`added_by_id`),

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/oracle/patches/009-updated_schema.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/oracle/patches/009-updated_schema.sql b/security-admin/db/oracle/patches/009-updated_schema.sql
index 30407c3..5152570 100644
--- a/security-admin/db/oracle/patches/009-updated_schema.sql
+++ b/security-admin/db/oracle/patches/009-updated_schema.sql
@@ -216,6 +216,24 @@ CONSTRAINT x_policy_cond_def_FK_added_by FOREIGN KEY (added_by_id) REFERENCES
x_
 CONSTRAINT x_policy_cond_def_FK_upd_by FOREIGN KEY (upd_by_id) REFERENCES x_portal_user (id)
 );
 commit;
+CREATE TABLE x_context_enricher_def(
+id NUMBER(20) NOT NULL,
+guid varchar(1024) DEFAULT NULL NULL,
+create_time DATE DEFAULT NULL NULL,
+update_time DATE DEFAULT NULL NULL,
+added_by_id NUMBER(20) DEFAULT NULL,
+upd_by_id NUMBER(20) DEFAULT NULL,
+def_id NUMBER(20) NOT NULL,
+name varchar(1024) DEFAULT NULL NULL,
+enricher varchar(1024) DEFAULT NULL NULL,
+enricher_options varchar(1024) DEFAULT NULL NULL,
+sort_order NUMBER(3) DEFAULT '0' NULL,
+primary key (id),
+CONSTRAINT x_cont_enr_def_FK_defid FOREIGN KEY (def_id) REFERENCES x_service_def (id),
+CONSTRAINT x_cont_enr_def_FK_added_by_id FOREIGN KEY (added_by_id) REFERENCES x_portal_user
(id),
+CONSTRAINT x_cont_enr_def_FK_upd_by_id FOREIGN KEY (upd_by_id) REFERENCES x_portal_user (id)
+);
+commit;
 CREATE TABLE x_enum_def (
 id NUMBER(20) NOT NULL,
 guid VARCHAR(1024) DEFAULT NULL NULL,

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/oracle/patches/010-users-and-groups-visibility.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/oracle/patches/010-users-and-groups-visibility.sql b/security-admin/db/oracle/patches/010-users-and-groups-visibility.sql
index 38dc8e4..20ad175 100644
--- a/security-admin/db/oracle/patches/010-users-and-groups-visibility.sql
+++ b/security-admin/db/oracle/patches/010-users-and-groups-visibility.sql
@@ -25,8 +25,7 @@ BEGIN
       execute immediate 'ALTER TABLE x_user ADD is_visible NUMBER(11) DEFAULT 1 NOT NULL';
       commit;
   end if;
-end;
-/
+end;/
 
 DECLARE
 	v_column_exists number := 0;
@@ -40,5 +39,4 @@ BEGIN
       execute immediate 'ALTER TABLE x_group ADD is_visible NUMBER(11) DEFAULT 1 NOT NULL';
       commit;
   end if;
-end;
-/
+end;/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/oracle/patches/011-auditcolumnssize.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/oracle/patches/011-auditcolumnssize.sql b/security-admin/db/oracle/patches/011-auditcolumnssize.sql
new file mode 100644
index 0000000..35a9320
--- /dev/null
+++ b/security-admin/db/oracle/patches/011-auditcolumnssize.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.
+
+
+DECLARE
+	v_column_exists number:=0;
+BEGIN
+  Select count(*) into v_column_exists
+    from user_tab_cols
+    where column_name = upper('REQUEST_DATA')
+      and table_name = upper('XA_ACCESS_AUDIT') and DATA_TYPE='VARCHAR2' and DATA_LENGTH=2000;
+
+  if (v_column_exists = 1) then
+      execute immediate 'ALTER TABLE XA_ACCESS_AUDIT modify(REQUEST_DATA VARCHAR(4000) DEFAULT
NULL)';
+      commit;
+  end if;
+  v_column_exists:=0;
+  Select count(*) into v_column_exists
+    from user_tab_cols
+    where column_name = upper('RESOURCE_PATH')
+      and table_name = upper('XA_ACCESS_AUDIT') and DATA_TYPE='VARCHAR2' and DATA_LENGTH=2000;
+
+  if (v_column_exists = 1) then
+      execute immediate 'ALTER TABLE XA_ACCESS_AUDIT modify(RESOURCE_PATH VARCHAR(4000) DEFAULT
NULL)';
+      commit;
+  end if;
+end;/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/oracle/xa_audit_db_oracle.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/oracle/xa_audit_db_oracle.sql b/security-admin/db/oracle/xa_audit_db_oracle.sql
index 3092055..67a99be 100644
--- a/security-admin/db/oracle/xa_audit_db_oracle.sql
+++ b/security-admin/db/oracle/xa_audit_db_oracle.sql
@@ -36,8 +36,8 @@ CREATE TABLE xa_access_audit (
 	event_time DATE DEFAULT NULL NULL ,
 	request_user VARCHAR(255) DEFAULT NULL NULL ,
 	action VARCHAR(2000) DEFAULT NULL NULL ,
-	request_data VARCHAR(2000) DEFAULT NULL NULL ,
-	resource_path VARCHAR(2000) DEFAULT NULL NULL ,
+	request_data VARCHAR(4000) DEFAULT NULL NULL ,
+	resource_path VARCHAR(4000) DEFAULT NULL NULL ,
 	resource_type VARCHAR(255) DEFAULT NULL NULL ,
 	PRIMARY KEY (id)
 );

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/postgres/xa_audit_db_postgres.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/postgres/xa_audit_db_postgres.sql b/security-admin/db/postgres/xa_audit_db_postgres.sql
index 035d885..d5f73c3 100644
--- a/security-admin/db/postgres/xa_audit_db_postgres.sql
+++ b/security-admin/db/postgres/xa_audit_db_postgres.sql
@@ -22,8 +22,8 @@ create_time TIMESTAMP DEFAULT NULL NULL,
 update_time TIMESTAMP DEFAULT NULL NULL,
 added_by_id BIGINT DEFAULT NULL NULL,
 upd_by_id BIGINT DEFAULT NULL NULL,
-audit_type BIGINT DEFAULT '0' NOT NULL,
-access_result BIGINT DEFAULT '0' NULL,
+audit_type INT DEFAULT '0' NOT NULL,
+access_result INT DEFAULT '0' NULL,
 access_type VARCHAR(255) DEFAULT NULL NULL,
 acl_enforcer VARCHAR(255) DEFAULT NULL NULL,
 agent_id VARCHAR(255) DEFAULT NULL NULL,
@@ -31,14 +31,14 @@ client_ip VARCHAR(255) DEFAULT NULL NULL,
 client_type VARCHAR(255) DEFAULT NULL NULL,
 policy_id BIGINT DEFAULT '0' NULL,
 repo_name VARCHAR(255) DEFAULT NULL NULL,
-repo_type BIGINT DEFAULT '0' NULL,
+repo_type INT DEFAULT '0' NULL,
 result_reason VARCHAR(255) DEFAULT NULL NULL,
 session_id VARCHAR(255) DEFAULT NULL NULL,
 event_time TIMESTAMP DEFAULT NULL NULL,
 request_user VARCHAR(255) DEFAULT NULL NULL,
 action VARCHAR(2000) DEFAULT NULL NULL,
-request_data VARCHAR(2000) DEFAULT NULL NULL,
-resource_path VARCHAR(2000) DEFAULT NULL NULL,
+request_data VARCHAR(4000) DEFAULT NULL NULL,
+resource_path VARCHAR(4000) DEFAULT NULL NULL,
 resource_type VARCHAR(255) DEFAULT NULL NULL,
 PRIMARY KEY (id)
 );

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/postgres/xa_core_db_postgres.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/postgres/xa_core_db_postgres.sql b/security-admin/db/postgres/xa_core_db_postgres.sql
index d4e0020..802ca4e 100644
--- a/security-admin/db/postgres/xa_core_db_postgres.sql
+++ b/security-admin/db/postgres/xa_core_db_postgres.sql
@@ -28,8 +28,8 @@ pub_scr_name VARCHAR(2048) DEFAULT NULL NULL,
 login_id VARCHAR(767) DEFAULT NULL NULL,
 password VARCHAR(512) NOT NULL,
 email VARCHAR(512) DEFAULT NULL NULL,
-status BIGINT DEFAULT '0' NOT NULL,
-user_src BIGINT DEFAULT '0' NOT NULL,
+status INT DEFAULT '0' NOT NULL,
+user_src INT DEFAULT '0' NOT NULL,
 notes VARCHAR(4000) DEFAULT NULL NULL,
 PRIMARY KEY(id),
 CONSTRAINT x_portal_user_UK_login_id UNIQUE(login_id),
@@ -49,8 +49,8 @@ added_by_id BIGINT DEFAULT NULL NULL,
 upd_by_id BIGINT DEFAULT NULL NULL,
 asset_name VARCHAR(1024) NOT NULL,
 descr VARCHAR(4000) DEFAULT NULL NULL,
-act_status BIGINT DEFAULT '0' NOT NULL,
-asset_type BIGINT DEFAULT '0' NOT NULL,
+act_status INT DEFAULT '0' NOT NULL,
+asset_type INT DEFAULT '0' NOT NULL,
 config TEXT NULL DEFAULT NULL,
 sup_native BOOLEAN DEFAULT '0' NOT NULL,
 PRIMARY KEY(id),
@@ -85,10 +85,11 @@ ADDED_BY_ID BIGINT DEFAULT NULL,
 UPD_BY_ID BIGINT DEFAULT NULL,
 GROUP_NAME VARCHAR(1024) NOT NULL,
 DESCR VARCHAR(4000) DEFAULT NULL NULL,
-STATUS BIGINT DEFAULT '0' NOT NULL,
-GROUP_TYPE BIGINT DEFAULT '0' NOT NULL,
+STATUS INT DEFAULT '0' NOT NULL,
+GROUP_TYPE INT DEFAULT '0' NOT NULL,
 CRED_STORE_ID BIGINT DEFAULT NULL,
-GROUP_SRC BIGINT NOT NULL DEFAULT 0,
+GROUP_SRC INT DEFAULT 0 NOT NULL,
+IS_VISIBLE INT DEFAULT '1' NOT NULL,
 PRIMARY KEY(ID),
 CONSTRAINT X_GROUP_FK_ADDED_BY_ID FOREIGN KEY(ADDED_BY_ID) REFERENCES X_PORTAL_USER(ID),
 CONSTRAINT X_GROUP_FK_CRED_STORE_ID FOREIGN KEY(CRED_STORE_ID) REFERENCES X_CRED_STORE(ID),
@@ -106,8 +107,9 @@ added_by_id BIGINT DEFAULT NULL NULL,
 upd_by_id BIGINT DEFAULT NULL NULL,
 user_name VARCHAR(1024) NOT NULL,
 descr VARCHAR(4000) DEFAULT NULL NULL,
-status BIGINT DEFAULT '0' NOT NULL,
+status INT DEFAULT '0' NOT NULL,
 cred_store_id BIGINT DEFAULT NULL NULL,
+is_visible INT DEFAULT '1' NOT NULL,
 PRIMARY KEY(id),
 CONSTRAINT x_user_FK_added_by_id FOREIGN KEY(added_by_id) REFERENCES x_portal_user(id),
 CONSTRAINT x_user_FK_cred_store_id FOREIGN KEY(cred_store_id) REFERENCES x_cred_store(id),
@@ -125,21 +127,21 @@ added_by_id BIGINT DEFAULT NULL NULL,
 upd_by_id BIGINT DEFAULT NULL NULL,
 res_name VARCHAR(4000) DEFAULT NULL NULL,
 descr VARCHAR(4000) DEFAULT NULL NULL,
-res_type BIGINT DEFAULT '0' NOT NULL,
+res_type INT DEFAULT '0' NOT NULL,
 asset_id BIGINT NOT NULL,
 parent_id BIGINT DEFAULT NULL NULL,
 parent_path VARCHAR(4000) DEFAULT NULL NULL,
-is_encrypt BIGINT DEFAULT '0' NOT NULL,
-is_recursive BIGINT DEFAULT '0' NOT NULL,
+is_encrypt INT DEFAULT '0' NOT NULL,
+is_recursive INT DEFAULT '0' NOT NULL,
 res_group VARCHAR(1024) DEFAULT NULL NULL,
 res_dbs TEXT NULL,
 res_tables TEXT NULL,
 res_col_fams TEXT NULL,
 res_cols TEXT NULL,
 res_udfs TEXT NULL,
-res_status BIGINT DEFAULT '1' NOT NULL,
-table_type BIGINT DEFAULT '0' NOT NULL,
-col_type BIGINT DEFAULT '0' NOT NULL,
+res_status INT DEFAULT '1' NOT NULL,
+table_type INT DEFAULT '0' NOT NULL,
+col_type INT DEFAULT '0' NOT NULL,
 policy_name VARCHAR( 500 ) NULL DEFAULT NULL,
 res_topologies TEXT NULL DEFAULT NULL,
 res_services TEXT NULL DEFAULT NULL,
@@ -185,10 +187,10 @@ login_id VARCHAR(767) NOT NULL,
 user_id BIGINT DEFAULT NULL NULL,
 ext_sess_id VARCHAR(512) DEFAULT NULL NULL,
 auth_time TIMESTAMP NOT NULL,
-auth_status BIGINT DEFAULT '0' NOT NULL,
-auth_type BIGINT DEFAULT '0' NOT NULL,
-auth_provider BIGINT DEFAULT '0' NOT NULL,
-device_type BIGINT DEFAULT '0' NOT NULL,
+auth_status INT DEFAULT '0' NOT NULL,
+auth_type INT DEFAULT '0' NOT NULL,
+auth_provider INT DEFAULT '0' NOT NULL,
+device_type INT DEFAULT '0' NOT NULL,
 req_ip VARCHAR(48) NOT NULL,
 req_ua VARCHAR(1024) DEFAULT NULL NULL,
 PRIMARY KEY(id),
@@ -262,9 +264,9 @@ perm_group VARCHAR(1024) DEFAULT NULL NULL,
 res_id BIGINT DEFAULT NULL NULL,
 group_id BIGINT DEFAULT NULL NULL,
 user_id BIGINT DEFAULT NULL NULL,
-perm_for BIGINT DEFAULT '0' NOT NULL,
-perm_type BIGINT DEFAULT '0' NOT NULL,
-is_recursive BIGINT DEFAULT '0' NOT NULL,
+perm_for INT DEFAULT '0' NOT NULL,
+perm_type INT DEFAULT '0' NOT NULL,
+is_recursive INT DEFAULT '0' NOT NULL,
 is_wild_card BOOLEAN DEFAULT '1' NOT NULL,
 grant_revoke BOOLEAN DEFAULT '1' NOT NULL,
 ip_address TEXT NULL DEFAULT NULL,
@@ -291,7 +293,7 @@ req_epoch BIGINT NOT NULL,
 last_updated TIMESTAMP DEFAULT NULL NULL,
 repository_name VARCHAR(1024) DEFAULT NULL NULL,
 exported_json TEXT NULL,
-http_ret_code BIGINT DEFAULT '0' NOT NULL,
+http_ret_code INT DEFAULT '0' NOT NULL,
 PRIMARY KEY(id),
 CONSTRAINT x_policy_export_audit_FK_added FOREIGN KEY(added_by_id) REFERENCES x_portal_user(id),
 CONSTRAINT x_policy_export_audit_FK_upd FOREIGN KEY(upd_by_id) REFERENCES x_portal_user(id)
@@ -308,7 +310,7 @@ added_by_id BIGINT DEFAULT NULL NULL,
 upd_by_id BIGINT DEFAULT NULL NULL,
 user_id BIGINT NOT NULL,
 user_role VARCHAR(128) DEFAULT NULL NULL,
-status BIGINT DEFAULT 0 NOT NULL,
+status INT DEFAULT 0 NOT NULL,
 PRIMARY KEY(id),
 CONSTRAINT x_portal_user_role_FK_addedby FOREIGN KEY(added_by_id) REFERENCES x_portal_user(id),
 CONSTRAINT x_portal_user_role_FK_updby FOREIGN KEY(upd_by_id) REFERENCES x_portal_user(id),
@@ -324,10 +326,10 @@ create_time TIMESTAMP DEFAULT NULL NULL,
 update_time TIMESTAMP DEFAULT NULL NULL,
 added_by_id BIGINT DEFAULT NULL NULL,
 upd_by_id BIGINT DEFAULT NULL NULL,
-class_type BIGINT DEFAULT '0' NOT NULL,
+class_type INT DEFAULT '0' NOT NULL,
 object_id BIGINT DEFAULT NULL NULL,
 parent_object_id BIGINT DEFAULT NULL NULL,
-parent_object_class_type BIGINT DEFAULT '0' NOT NULL,
+parent_object_class_type INT DEFAULT '0' NOT NULL,
 parent_object_name VARCHAR(1024) DEFAULT NULL NULL,
 object_name VARCHAR(1024) DEFAULT NULL NULL,
 attr_name VARCHAR(255) DEFAULT NULL NULL,
@@ -352,8 +354,8 @@ create_time TIMESTAMP DEFAULT NULL NULL,
 update_time TIMESTAMP DEFAULT NULL NULL,
 added_by_id BIGINT DEFAULT NULL NULL,
 upd_by_id BIGINT DEFAULT NULL NULL,
-audit_type BIGINT DEFAULT '0' NOT NULL,
-access_result BIGINT DEFAULT '0' NULL,
+audit_type INT DEFAULT '0' NOT NULL,
+access_result INT DEFAULT '0' NULL,
 access_type VARCHAR(255) DEFAULT NULL NULL,
 acl_enforcer VARCHAR(255) DEFAULT NULL NULL,
 agent_id VARCHAR(255) DEFAULT NULL NULL,
@@ -367,8 +369,8 @@ session_id VARCHAR(255) DEFAULT NULL NULL,
 event_time TIMESTAMP DEFAULT NULL NULL,
 request_user VARCHAR(255) DEFAULT NULL NULL,
 action VARCHAR(2000) DEFAULT NULL NULL,
-request_data VARCHAR(2000) DEFAULT NULL NULL,
-resource_path VARCHAR(2000) DEFAULT NULL NULL,
+request_data VARCHAR(4000) DEFAULT NULL NULL,
+resource_path VARCHAR(4000) DEFAULT NULL NULL,
 resource_type VARCHAR(255) DEFAULT NULL NULL,
 PRIMARY KEY(id)
 );
@@ -539,10 +541,14 @@ type VARCHAR(1024) DEFAULT NULL NULL,
 sub_type VARCHAR(1024) DEFAULT NULL NULL,
 is_mandatory BOOLEAN DEFAULT '0' NOT NULL,
 default_value VARCHAR(1024) DEFAULT NULL NULL,
+validation_reg_ex varchar(1024) DEFAULT NULL NULL,
+validation_message varchar(1024) DEFAULT NULL NULL,
+ui_hint varchar(1024) DEFAULT NULL NULL,
 label VARCHAR(1024) DEFAULT NULL NULL,
 description VARCHAR(1024) DEFAULT NULL NULL,
 rb_key_label VARCHAR(1024) DEFAULT NULL NULL,
-rb_key_decription VARCHAR(1024) DEFAULT NULL NULL,
+rb_key_description VARCHAR(1024) DEFAULT NULL NULL,
+rb_key_validation_message VARCHAR(1024) DEFAULT NULL NULL,
 sort_order SMALLINT DEFAULT '0' NULL,
 primary key(id),
 CONSTRAINT x_service_conf_def_FK_defid FOREIGN KEY(def_id) REFERENCES x_service_def(id),
@@ -570,10 +576,14 @@ recursive_supported BOOLEAN DEFAULT '0' NOT NULL,
 excludes_supported BOOLEAN DEFAULT '0' NOT NULL,
 matcher VARCHAR(1024) DEFAULT NULL NULL,
 matcher_options varchar(1024) DEFAULT NULL NULL,
+validation_reg_ex varchar(1024) DEFAULT NULL NULL,
+validation_message varchar(1024) DEFAULT NULL NULL,
+ui_hint varchar(1024) DEFAULT NULL NULL,
 label VARCHAR(1024) DEFAULT NULL NULL,
 description VARCHAR(1024) DEFAULT NULL NULL,
 rb_key_label VARCHAR(1024) DEFAULT NULL NULL,
 rb_key_description VARCHAR(1024) DEFAULT NULL NULL,
+rb_key_validation_message VARCHAR(1024) DEFAULT NULL NULL,
 sort_order SMALLINT DEFAULT '0' NULL,
 primary key(id),
 CONSTRAINT x_resource_def_FK_parent FOREIGN KEY(parent) REFERENCES x_resource_def(id),
@@ -632,10 +642,14 @@ def_id BIGINT NOT NULL,
 name VARCHAR(1024) DEFAULT NULL NULL,
 evaluator VARCHAR(1024) DEFAULT NULL NULL,
 evaluator_options VARCHAR(1024) DEFAULT NULL NULL,
+validation_reg_ex varchar(1024) DEFAULT NULL NULL,
+validation_message varchar(1024) DEFAULT NULL NULL,
+ui_hint varchar(1024) DEFAULT NULL NULL,
 label VARCHAR(1024) DEFAULT NULL NULL,
 description VARCHAR(1024) DEFAULT NULL NULL,
 rb_key_label VARCHAR(1024) DEFAULT NULL NULL,
 rb_key_description VARCHAR(1024) DEFAULT NULL NULL,
+rb_key_validation_message VARCHAR(1024) DEFAULT NULL NULL,
 sort_order SMALLINT DEFAULT '0' NULL,
 primary key(id),
 CONSTRAINT x_policy_cond_def_FK_defid FOREIGN KEY(def_id) REFERENCES x_service_def(id),

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/sqlserver/xa_audit_db_sqlserver.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/sqlserver/xa_audit_db_sqlserver.sql b/security-admin/db/sqlserver/xa_audit_db_sqlserver.sql
index e521409..83d4fa1 100644
--- a/security-admin/db/sqlserver/xa_audit_db_sqlserver.sql
+++ b/security-admin/db/sqlserver/xa_audit_db_sqlserver.sql
@@ -40,8 +40,8 @@ CREATE TABLE [dbo].[xa_access_audit](
 	[event_time] [datetime2] DEFAULT NULL NULL,
 	[request_user] [varchar](255) DEFAULT NULL NULL,
 	[action] [varchar](2000) DEFAULT NULL NULL,
-	[request_data] [varchar](2000) DEFAULT NULL NULL,
-	[resource_path] [varchar](2000) DEFAULT NULL NULL,
+	[request_data] [varchar](4000) DEFAULT NULL NULL,
+	[resource_path] [varchar](4000) DEFAULT NULL NULL,
 	[resource_type] [varchar](255) DEFAULT NULL NULL,
 PRIMARY KEY CLUSTERED 
 (

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/23482def/security-admin/db/sqlserver/xa_core_db_sqlserver.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/sqlserver/xa_core_db_sqlserver.sql b/security-admin/db/sqlserver/xa_core_db_sqlserver.sql
index f58a420..9486982 100644
--- a/security-admin/db/sqlserver/xa_core_db_sqlserver.sql
+++ b/security-admin/db/sqlserver/xa_core_db_sqlserver.sql
@@ -411,8 +411,8 @@ CREATE TABLE [dbo].[xa_access_audit](
 	[event_time] [datetime2] DEFAULT NULL NULL,
 	[request_user] [varchar](255) DEFAULT NULL NULL,
 	[action] [varchar](2000) DEFAULT NULL NULL,
-	[request_data] [varchar](2000) DEFAULT NULL NULL,
-	[resource_path] [varchar](2000) DEFAULT NULL NULL,
+	[request_data] [varchar](4000) DEFAULT NULL NULL,
+	[resource_path] [varchar](4000) DEFAULT NULL NULL,
 	[resource_type] [varchar](255) DEFAULT NULL NULL,
 PRIMARY KEY CLUSTERED 
 (
@@ -533,6 +533,7 @@ CREATE TABLE [dbo].[x_group](
 	[group_type] [int] DEFAULT 0 NOT NULL,
 	[cred_store_id] [bigint] DEFAULT NULL NULL,
 	[group_src] [int] DEFAULT 0 NOT NULL,
+	[is_visible] [int] DEFAULT 1 NOT NULL,
 PRIMARY KEY CLUSTERED 
 (
 	[id] ASC
@@ -577,7 +578,8 @@ CREATE TABLE [dbo].[x_user](
 	[user_name] [varchar](1024) NOT NULL,
 	[descr] [varchar](4000) NOT NULL,
 	[status] [int] DEFAULT 0 NOT NULL,
-	[cred_store_id] [bigint]DEFAULT NULL NULL,
+	[cred_store_id] [bigint] DEFAULT NULL NULL,
+	[is_visible] [int] DEFAULT 1 NOT NULL,
 PRIMARY KEY CLUSTERED 
 (
 	[id] ASC
@@ -1839,10 +1841,14 @@ CREATE TABLE [dbo].[x_service_config_def] (
 	[sub_type] [varchar](1024) DEFAULT NULL NULL,
 	[is_mandatory] [tinyint] DEFAULT 0 NOT NULL,
 	[default_value] [varchar](1024) DEFAULT NULL NULL,
+	[validation_reg_ex] [varchar](1024) DEFAULT NULL NULL,
+	[validation_message] [varchar](1024) DEFAULT NULL NULL,
+	[ui_hint] [varchar](1024) DEFAULT NULL NULL,
 	[label] [varchar](1024) DEFAULT NULL NULL,
 	[description] [varchar](1024) DEFAULT NULL NULL,
 	[rb_key_label] [varchar](1024) DEFAULT NULL NULL,
-	[rb_key_decription] [varchar](1024) DEFAULT NULL NULL,
+	[rb_key_description] [varchar](1024) DEFAULT NULL NULL,
+	[rb_key_validation_message] [varchar](1024) DEFAULT NULL NULL,
 	[sort_order] [tinyint] DEFAULT 0  NULL,
 	PRIMARY KEY CLUSTERED 
 (
@@ -1874,10 +1880,14 @@ CREATE TABLE [dbo].[x_resource_def] (
 	[excludes_supported] [tinyint] DEFAULT 0 NOT NULL,
 	[matcher] [varchar](1024) DEFAULT NULL NULL,
 	[matcher_options] [varchar](1024) DEFAULT NULL NULL,
+	[validation_reg_ex] [varchar](1024) DEFAULT NULL NULL,
+	[validation_message] [varchar](1024) DEFAULT NULL NULL,
+	[ui_hint] [varchar](1024) DEFAULT NULL NULL,
 	[label] [varchar](1024) DEFAULT NULL NULL,  
 	[description] [varchar](1024) DEFAULT NULL NULL,  
 	[rb_key_label] [varchar](1024) DEFAULT NULL NULL,  
 	[rb_key_description] [varchar](1024) DEFAULT NULL NULL, 
+	[rb_key_validation_message] [varchar](1024) DEFAULT NULL NULL,
 	[sort_order] [tinyint] DEFAULT 0  NULL, 
 	PRIMARY KEY CLUSTERED 
 (
@@ -1947,10 +1957,14 @@ CREATE TABLE [dbo].[x_policy_condition_def] (
 	[name] [varchar](1024) DEFAULT NULL NULL,  
 	[evaluator] [varchar](1024) DEFAULT NULL NULL,
 	[evaluator_options] [varchar](1024) DEFAULT NULL NULL,
+	[validation_reg_ex] [varchar](1024) DEFAULT NULL NULL,
+	[validation_message] [varchar](1024) DEFAULT NULL NULL,
+	[ui_hint] [varchar](1024) DEFAULT NULL NULL,
 	[label] [varchar](1024) DEFAULT NULL NULL,  
 	[description] [varchar](1024) DEFAULT NULL NULL,  
 	[rb_key_label] [varchar](1024) DEFAULT NULL NULL,  
 	[rb_key_description] [varchar](1024) DEFAULT NULL NULL,  
+	[rb_key_validation_message] [varchar](1024) DEFAULT NULL NULL,
 	[sort_order] [tinyint] DEFAULT 0  NULL,
 	PRIMARY KEY CLUSTERED 
 (


Mime
View raw message