From f6405cb8e0f6ba96415bdef8e6442ebdd836dd4d Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 6 Apr 2015 15:50:35 +0200 Subject: [PATCH] Reduced the length of the profile types cause they only store 1 or 0 --- pandora_console/pandoradb.oracle.sql | 34 ++++++++++++++-------------- pandora_console/pandoradb.sql | 34 ++++++++++++++-------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index b8438d6a83..bdfc0f59a4 100755 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -823,23 +823,23 @@ CREATE TABLE torigen ( CREATE TABLE tperfil ( id_perfil NUMBER(10, 0) NOT NULL PRIMARY KEY, name CLOB default '', - incident_edit NUMBER(5, 0) default 0 NOT NULL, - incident_view NUMBER(5, 0) default 0 NOT NULL, - incident_management NUMBER(5, 0) default 0 NOT NULL, - agent_view NUMBER(5, 0) default 0 NOT NULL, - agent_edit NUMBER(5, 0) default 0 NOT NULL, - alert_edit NUMBER(5, 0) default 0 NOT NULL, - user_management NUMBER(5, 0) default 0 NOT NULL, - db_management NUMBER(5, 0) default 0 NOT NULL, - alert_management NUMBER(5, 0) default 0 NOT NULL, - pandora_management NUMBER(5, 0) default 0 NOT NULL, - report_view NUMBER(5, 0) default 0 NOT NULL, - report_edit NUMBER(5, 0) default 0 NOT NULL, - report_management NUMBER(5, 0) default 0 NOT NULL, - event_view NUMBER(5, 0) default 0 NOT NULL, - event_edit NUMBER(5, 0) default 0 NOT NULL, - event_management NUMBER(5, 0) default 0 NOT NULL, - agent_disable NUMBER(5, 0) default 0 NOT NULL + incident_edit NUMBER(1, 0) default 0 NOT NULL, + incident_view NUMBER(1, 0) default 0 NOT NULL, + incident_management NUMBER(1, 0) default 0 NOT NULL, + agent_view NUMBER(1, 0) default 0 NOT NULL, + agent_edit NUMBER(1, 0) default 0 NOT NULL, + alert_edit NUMBER(1, 0) default 0 NOT NULL, + user_management NUMBER(1, 0) default 0 NOT NULL, + db_management NUMBER(1, 0) default 0 NOT NULL, + alert_management NUMBER(1, 0) default 0 NOT NULL, + pandora_management NUMBER(1, 0) default 0 NOT NULL, + report_view NUMBER(1, 0) default 0 NOT NULL, + report_edit NUMBER(1, 0) default 0 NOT NULL, + report_management NUMBER(1, 0) default 0 NOT NULL, + event_view NUMBER(1, 0) default 0 NOT NULL, + event_edit NUMBER(1, 0) default 0 NOT NULL, + event_management NUMBER(1, 0) default 0 NOT NULL, + agent_disable NUMBER(1, 0) default 0 NOT NULL ); CREATE SEQUENCE tperfil_s INCREMENT BY 1 START WITH 1; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 5674dba402..c38e69183e 100755 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -782,23 +782,23 @@ CREATE TABLE IF NOT EXISTS `torigen` ( CREATE TABLE IF NOT EXISTS `tperfil` ( `id_perfil` int(10) unsigned NOT NULL auto_increment, `name` TEXT NOT NULL, - `incident_edit` tinyint(3) NOT NULL default '0', - `incident_view` tinyint(3) NOT NULL default '0', - `incident_management` tinyint(3) NOT NULL default '0', - `agent_view` tinyint(3) NOT NULL default '0', - `agent_edit` tinyint(3) NOT NULL default '0', - `alert_edit` tinyint(3) NOT NULL default '0', - `user_management` tinyint(3) NOT NULL default '0', - `db_management` tinyint(3) NOT NULL default '0', - `alert_management` tinyint(3) NOT NULL default '0', - `pandora_management` tinyint(3) NOT NULL default '0', - `report_view` tinyint(3) NOT NULL default '0', - `report_edit` tinyint(3) NOT NULL default '0', - `report_management` tinyint(3) NOT NULL default '0', - `event_view` tinyint(3) NOT NULL default '0', - `event_edit` tinyint(3) NOT NULL default '0', - `event_management` tinyint(3) NOT NULL default '0', - `agent_disable` tinyint(3) NOT NULL default '0', + `incident_edit` tinyint(1) NOT NULL DEFAULT 0, + `incident_view` tinyint(1) NOT NULL DEFAULT 0, + `incident_management` tinyint(1) NOT NULL DEFAULT 0, + `agent_view` tinyint(1) NOT NULL DEFAULT 0, + `agent_edit` tinyint(1) NOT NULL DEFAULT 0, + `alert_edit` tinyint(1) NOT NULL DEFAULT 0, + `user_management` tinyint(1) NOT NULL DEFAULT 0, + `db_management` tinyint(1) NOT NULL DEFAULT 0, + `alert_management` tinyint(1) NOT NULL DEFAULT 0, + `pandora_management` tinyint(1) NOT NULL DEFAULT 0, + `report_view` tinyint(1) NOT NULL DEFAULT 0, + `report_edit` tinyint(1) NOT NULL DEFAULT 0, + `report_management` tinyint(1) NOT NULL DEFAULT 0, + `event_view` tinyint(1) NOT NULL DEFAULT 0, + `event_edit` tinyint(1) NOT NULL DEFAULT 0, + `event_management` tinyint(1) NOT NULL DEFAULT 0, + `agent_disable` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id_perfil`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;