From 9b1cbf3c9bd5139833b981eaba5ef63c4eb8d75d Mon Sep 17 00:00:00 2001
From: Daniel Maya <daniel.maya@artica.es>
Date: Tue, 24 Oct 2017 13:10:07 +0200
Subject: [PATCH] Changed column in tuser_task_scheduled

---
 pandora_console/extras/mr/9.sql                     | 13 +++++++++++++
 .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql   |  4 ++++
 2 files changed, 17 insertions(+)
 create mode 100644 pandora_console/extras/mr/9.sql

diff --git a/pandora_console/extras/mr/9.sql b/pandora_console/extras/mr/9.sql
new file mode 100644
index 0000000000..90f8cde128
--- /dev/null
+++ b/pandora_console/extras/mr/9.sql
@@ -0,0 +1,13 @@
+START TRANSACTION;
+
+SET @st_oum708 = (SELECT IF(
+    (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tuser_task_scheduled') > 0,
+    "ALTER TABLE tuser_task_scheduled MODIFY args TEXT NOT NULL",
+    "SELECT 1"
+));
+
+PREPARE pr_oum708 FROM @st_oum708;
+EXECUTE pr_oum708;
+DEALLOCATE PREPARE pr_oum708;
+
+COMMIT;
\ No newline at end of file
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 4e31057a89..18b93b8eac 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
@@ -1326,6 +1326,10 @@ SET @vv1 = (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema =
 IF @vv1>0 THEN
 	ALTER TABLE tbackup ADD COLUMN `filepath` varchar(512) NOT NULL DEFAULT "";
 END IF;
+SET @vv2 = (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tuser_task_scheduled');
+IF @vv2>0 THEN
+	ALTER TABLE tuser_task_scheduled MODIFY args TEXT NOT NULL;
+END IF;
 END;
 //
 delimiter ;