From 348fd612fb387f834f58ef87c71f449e23bbb64c Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Fri, 8 Jul 2011 09:56:18 +0000 Subject: [PATCH] 2011-07-08 Sergio Martin * pandoradb.sql pandoradb.postgreSQL.sql pandoradb.oracle.sql extras/pandoradb_migrate_v3.2_to_v4.0.sql: Added 'always' to the possible values into talert_templates.type git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4534 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql | 6 ++++++ pandora_console/pandoradb.oracle.sql | 2 +- pandora_console/pandoradb.postgreSQL.sql | 2 +- pandora_console/pandoradb.sql | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 9df40f6ffb..349b1e929e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-07-08 Sergio Martin + + * pandoradb.sql + pandoradb.postgreSQL.sql + pandoradb.oracle.sql + extras/pandoradb_migrate_v3.2_to_v4.0.sql: Added 'always' to the + possible values into talert_templates.type + 2011-07-08 Sergio Martin * include/functions_alerts.php: Add always condition to templates diff --git a/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql b/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql index a2082160fc..42396f1dd5 100644 --- a/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql +++ b/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql @@ -208,3 +208,9 @@ ALTER TABLE `trecon_task` ADD COLUMN `disabled` tinyint(1) UNSIGNED NOT NULL DEF -- ----------------------------------------------------- ALTER TABLE `tplanned_downtime` ADD COLUMN `only_alerts` TINYINT(1) NOT NULL DEFAULT 0; + +-- ----------------------------------------------------- +-- Table `talert_templates` +-- ----------------------------------------------------- + +ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown', 'always') DEFAULT NULL; diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index e8303bfa91..a1fdf1330e 100644 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -310,7 +310,7 @@ CREATE TABLE talert_templates ( field3_recovery CLOB NOT NULL, priority NUMBER(10, 0) default 0 NOT NULL, id_group NUMBER(10, 0) default 0 NOT NULL, - CONSTRAINT t_alert_templates_type_cons CHECK (type IN ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown')) + CONSTRAINT t_alert_templates_type_cons CHECK (type IN ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown', 'always')) ); CREATE INDEX talert_templates_id_al_act_idx ON talert_templates(id_alert_action); diff --git a/pandora_console/pandoradb.postgreSQL.sql b/pandora_console/pandoradb.postgreSQL.sql index 28caa70212..1791de2797 100644 --- a/pandora_console/pandoradb.postgreSQL.sql +++ b/pandora_console/pandoradb.postgreSQL.sql @@ -245,7 +245,7 @@ CREATE TABLE "talert_actions" ( "action_threshold" BIGINT NOT NULL default 0 ); -CREATE TYPE type_talert_templates_alert_template AS ENUM ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown'); +CREATE TYPE type_talert_templates_alert_template AS ENUM ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown', 'always'); CREATE TABLE "talert_templates" ( "id" SERIAL NOT NULL PRIMARY KEY, "name" text default '', diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index d2d9b97925..dfe57c1928 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -255,7 +255,7 @@ CREATE TABLE IF NOT EXISTS `talert_templates` ( `field1` text default '', `field2` text default '', `field3` text NOT NULL, - `type` ENUM ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown'), + `type` ENUM ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown', 'always'), `value` varchar(255) default '', `matches_value` tinyint(1) default 0, `max_value` double(18,2) default NULL,