From 67db5a32128a17d69a060ab934a99d1f4fc39373 Mon Sep 17 00:00:00 2001
From: Ramon Novoa <rnovoa@artica.es>
Date: Mon, 27 Oct 2014 16:43:48 +0100
Subject: [PATCH] Fixed SQL errors.

---
 .../extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql      | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql
index 018f876289..c6fe3d359b 100644
--- a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql
+++ b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql
@@ -244,7 +244,8 @@ INSERT INTO `talert_commands` (`name`, `command`, `description`, `internal`, `fi
 -- ---------------------------------------------------------------------
 -- Table `talert_actions`
 -- ---------------------------------------------------------------------
-INSERT INTO `talert_actions` (`name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`) VALUES ('Create&#x20;a&#x20;ticket&#x20;in&#x20;Integria&#x20;IMS',13,'http://localhost/integria/include/api.php','1234','admin','_agent_:&#x20;_alert_name_','1','3','_alert_description_','','','',0,0);
+SET @command_id = (SELECT id FROM talert_commands WHERE name='Integria&#x20;IMS&#x20;Ticket');
+INSERT INTO `talert_actions` (`name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`) VALUES ('Create&#x20;a&#x20;ticket&#x20;in&#x20;Integria&#x20;IMS',@command_id,'http://localhost/integria/include/api.php','1234','admin','_agent_:&#x20;_alert_name_','1','3','_alert_description_','','','',0,0);
 
 -- ---------------------------------------------------------------------
 -- Table `tconfig`
@@ -254,9 +255,9 @@ DELETE FROM `tconfig` WHERE `token`='sla_period';
 -- ---------------------------------------------------------------------
 -- Table `network_component`
 -- ---------------------------------------------------------------------
-UPDATE FROM `network_component` SET `module_inteval`= 3600 WHERE `id_nc`=53;
-UPDATE FROM `network_component` SET `post_process`= 0.000000115740741 WHERE `id_nc`=53;
-UPDATE FROM `network_component` SET `unit`= 'day' WHERE `id_nc`=53;
+UPDATE `tnetwork_component` SET `module_interval`= 3600 WHERE `id_nc`=53;
+UPDATE `tnetwork_component` SET `post_process`= 0.000000115740741 WHERE `id_nc`=53;
+UPDATE `tnetwork_component` SET `unit`= 'day' WHERE `id_nc`=53;
 
 -- ---------------------------------------------------------------------
 -- Table `tnetwork_component`