From 6b83deacdd8663765ddb91943cbcfcee49943f46 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 30 Apr 2021 14:34:10 +0200 Subject: [PATCH] Migrate old rules --- pandora_console/extras/mr/46.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/extras/mr/46.sql b/pandora_console/extras/mr/46.sql index 315180102a..66cea5691c 100644 --- a/pandora_console/extras/mr/46.sql +++ b/pandora_console/extras/mr/46.sql @@ -20,12 +20,13 @@ ALTER TABLE `tevent_rule` MODIFY COLUMN `group_recursion` TEXT; ALTER TABLE `tevent_rule` MODIFY COLUMN `log_content` TEXT; ALTER TABLE `tevent_rule` MODIFY COLUMN `log_source` TEXT; ALTER TABLE `tevent_rule` MODIFY COLUMN `log_agent` TEXT; +ALTER TABLE tevent_filter ADD COLUMN `server_id` int(10) NOT NULL default 0; UPDATE `talert_commands` SET `fields_descriptions` = '[\"Event name\",\"Event type\",\"Source\",\"Agent name or _agent_\",\"Event severity\",\"ID extra\",\"Tags separated by commas\",\"Comments\",\"\",\"\"]' WHERE `name` = "Monitoring Event"; - UPDATE `tskin` SET `name` = 'Default theme' , `relative_path` = 'pandora.css' WHERE `id` = 1; UPDATE `tskin` SET `name` = 'Black theme' , `relative_path` = 'Black theme' , `description` = 'Black theme' WHERE `id` = 2; -ALTER TABLE tevent_filter ADD COLUMN `server_id` int(10) NOT NULL default 0; +UPDATE `tevent_rule` SET `criticity` = NULL, `operator_criticity` = NULL WHERE `criticity` = 99; +UPDATE `tevent_rule` SET `operator_criticity` = '==' WHERE `criticity` != 99 AND `criticity` IS NOT NULL; COMMIT;