From 0213bc675e074af8b11970a2fc0d5bda0f9b8f23 Mon Sep 17 00:00:00 2001
From: Daniel Barbero Martin <daniel.barbero@artica.es>
Date: Fri, 8 Nov 2019 11:28:37 +0100
Subject: [PATCH] add changes bbdd

---
 pandora_console/extras/mr/33.sql                              | 4 ++++
 pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 3 +++
 pandora_console/pandoradb.sql                                 | 3 +++
 3 files changed, 10 insertions(+)

diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql
index 3d5e32a42d..2692664cc2 100644
--- a/pandora_console/extras/mr/33.sql
+++ b/pandora_console/extras/mr/33.sql
@@ -8,4 +8,8 @@ INSERT INTO `ttipo_modulo` VALUES
 (36,'remote_cmd_string', 10, 'Remote execution, alphanumeric data', 'mod_remote_cmd_string.png'),
 (37,'remote_cmd_inc', 10, 'Remote execution, incremental data', 'mod_remote_cmd_inc.png');
 
+ALTER TABLE `tevent_rule` ADD COLUMN `log_content` TEXT;
+ALTER TABLE `tevent_rule` ADD COLUMN `log_source` TEXT;
+ALTER TABLE `tevent_rule` ADD COLUMN `log_agent` TEXT;
+
 COMMIT;
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 a9def8a20d..edbf4750d7 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
@@ -564,6 +564,9 @@ CREATE TABLE IF NOT EXISTS `tevent_rule` (
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 ALTER TABLE `tevent_rule` ADD COLUMN `group_recursion` INT(1) unsigned default 0;
+ALTER TABLE `tevent_rule` ADD COLUMN `log_content` TEXT;
+ALTER TABLE `tevent_rule` ADD COLUMN `log_source` TEXT;
+ALTER TABLE `tevent_rule` ADD COLUMN `log_agent` TEXT;
 
 -- -----------------------------------------------------
 -- Table `tevent_alert`
diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql
index 3b11dccb4d..2370a973e7 100644
--- a/pandora_console/pandoradb.sql
+++ b/pandora_console/pandoradb.sql
@@ -2782,6 +2782,9 @@ CREATE TABLE IF NOT EXISTS `tevent_rule` (
 	`id_tag` integer(10) unsigned NOT NULL default '0',
 	`name` text default '',
 	`group_recursion` INT(1) unsigned default 0,
+	`log_content` text,
+	`log_source` text,
+	`log_agent` text,
 	PRIMARY KEY  (`id_event_rule`),
 	KEY `idx_id_event_alert` (`id_event_alert`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;