diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 3f540c3b02..9034e54154 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -39,6 +39,20 @@ ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_content` text COMMENT 'Operat ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text COMMENT 'Operator for log_source'; ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text COMMENT 'Operator for log_agent'; +UPDATE `tevent_rule` SET `operator_agent` = "REGEX" WHERE `agent` != ''; +UPDATE `tevent_rule` SET `operator_id_usuario` = "REGEX" WHERE `id_usuario` != ''; +UPDATE `tevent_rule` SET `operator_id_grupo` = "REGEX" WHERE `id_grupo` > 0; +UPDATE `tevent_rule` SET `operator_evento` = "REGEX" WHERE `evento` != ''; +UPDATE `tevent_rule` SET `operator_event_type` = "REGEX" WHERE `event_type` != ''; +UPDATE `tevent_rule` SET `operator_module` = "REGEX" WHERE `module` != ''; +UPDATE `tevent_rule` SET `operator_alert` = "REGEX" WHERE `alert` != ''; +UPDATE `tevent_rule` SET `operator_criticity` = "REGEX" WHERE `criticity` != '99'; +UPDATE `tevent_rule` SET `operator_user_comment` = "REGEX" WHERE `user_comment` != ''; +UPDATE `tevent_rule` SET `operator_id_tag` = "REGEX" WHERE `id_tag` > 0; +UPDATE `tevent_rule` SET `operator_log_content` = "REGEX" WHERE `log_content` != ''; +UPDATE `tevent_rule` SET `operator_log_source` = "REGEX" WHERE `log_source` != ''; +UPDATE `tevent_rule` SET `operator_log_agent` = "REGEX" WHERE `log_agent` != ''; + ALTER TABLE `tevent_alert` ADD COLUMN `special_days` tinyint(1) default 0; ALTER TABLE `tevent_alert` MODIFY COLUMN `time_threshold` int(10) NOT NULL default 86400; diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 69dbdecb84..58536b19de 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -599,6 +599,20 @@ ALTER TABLE `tevent_rule` MODIFY COLUMN `event_type` enum('','unknown','alert_fi ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned DEFAULT NULL; ALTER TABLE `tevent_rule` MODIFY COLUMN `id_grupo` mediumint(4) DEFAULT NULL; +UPDATE `tevent_rule` SET `operator_agent` = "REGEX" WHERE `agent` != ''; +UPDATE `tevent_rule` SET `operator_id_usuario` = "REGEX" WHERE `id_usuario` != ''; +UPDATE `tevent_rule` SET `operator_id_grupo` = "REGEX" WHERE `id_grupo` > 0; +UPDATE `tevent_rule` SET `operator_evento` = "REGEX" WHERE `evento` != ''; +UPDATE `tevent_rule` SET `operator_event_type` = "REGEX" WHERE `event_type` != ''; +UPDATE `tevent_rule` SET `operator_module` = "REGEX" WHERE `module` != ''; +UPDATE `tevent_rule` SET `operator_alert` = "REGEX" WHERE `alert` != ''; +UPDATE `tevent_rule` SET `operator_criticity` = "REGEX" WHERE `criticity` != '99'; +UPDATE `tevent_rule` SET `operator_user_comment` = "REGEX" WHERE `user_comment` != ''; +UPDATE `tevent_rule` SET `operator_id_tag` = "REGEX" WHERE `id_tag` > 0; +UPDATE `tevent_rule` SET `operator_log_content` = "REGEX" WHERE `log_content` != ''; +UPDATE `tevent_rule` SET `operator_log_source` = "REGEX" WHERE `log_source` != ''; +UPDATE `tevent_rule` SET `operator_log_agent` = "REGEX" WHERE `log_agent` != ''; + -- ----------------------------------------------------- -- Table `tevent_alert` -- -----------------------------------------------------