From d58372564abac2abfef9d0857ce77bf9a6b3f933 Mon Sep 17 00:00:00 2001 From: slerena Date: Mon, 28 Sep 2009 10:40:52 +0000 Subject: [PATCH] 2009-09-28 Sancho Lerena * pandoradb.sql: Added id_group to talert_action, talert_templates and tplanned_downtime to be able to segregate all pandora functions for different groups/users. Need to implement in interface code. * extras/pandoradb_migrate_v2.x_to_v3.0.sql: Updated migration script for latest SQL changes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1985 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++++++++ .../extras/pandoradb_migrate_v2.x_to_v3.0.sql | 4 +++- pandora_console/pandoradb.sql | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ec1433b951..17ea3eca74 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2009-09-28 Sancho Lerena + + * pandoradb.sql: Added id_group to talert_action, talert_templates and + tplanned_downtime to be able to segregate all pandora functions for + different groups/users. Need to implement in interface code. + + * extras/pandoradb_migrate_v2.x_to_v3.0.sql: Updated migration script + for latest SQL changes. + 2009-09-28 Sancho Lerena * godmode/agentes/module_manager_editor_common.php: Postprocess field diff --git a/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql b/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql index 8e4f243ba7..389d376a4f 100644 --- a/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql +++ b/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql @@ -294,4 +294,6 @@ ALTER TABLE tagente DROP id_prediction_server; ALTER TABLE tgraph ADD `id_group` mediumint(8) unsigned NULL default 0; - +ALTER TABLE talert_templates ADD `id_group` mediumint(8) unsigned NULL default 0; +ALTER TABLE talert_actions ADD `id_group` mediumint(8) unsigned NULL default 0; +ALTER TABLE tplanned_downtime ADD `id_group` mediumint(8) unsigned NULL default 0; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index e83d3af9d4..c33f2d2d31 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -214,6 +214,7 @@ CREATE TABLE IF NOT EXISTS `talert_actions` ( `field1` varchar(255) NOT NULL default '', `field2` varchar(255) default '', `field3` varchar(255) default '', + `id_group` mediumint(8) unsigned NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`id_alert_command`) REFERENCES talert_commands(`id`) ON DELETE CASCADE ON UPDATE CASCADE @@ -248,6 +249,7 @@ CREATE TABLE IF NOT EXISTS `talert_templates` ( `field2_recovery` varchar(255) NOT NULL default '', `field3_recovery` mediumtext NOT NULL, `priority` tinyint(4) default '0', + `id_group` mediumint(8) unsigned NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`id_alert_action`) REFERENCES talert_actions(`id`) ON DELETE SET NULL ON UPDATE CASCADE @@ -838,6 +840,7 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime` ( `date_from` bigint(20) NOT NULL default '0', `date_to` bigint(20) NOT NULL default '0', `executed` tinyint(1) UNSIGNED NOT NULL default 0, + `id_group` mediumint(8) unsigned NULL default 0, PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET=utf8;