alarm_params needs to be a BLOB to store serialized Horde_Mime_Part objects.
authorJan Schneider <jan@horde.org>
Thu, 23 Dec 2010 16:18:55 +0000 (17:18 +0100)
committerJan Schneider <jan@horde.org>
Thu, 23 Dec 2010 16:20:28 +0000 (17:20 +0100)
framework/Alarm/migration/Horde/Alarm/2_horde_alarms_params_blob.php [new file with mode: 0644]
horde/scripts/upgrades/2010-12-23_horde_alarms_params_blob.sql [new file with mode: 0644]

diff --git a/framework/Alarm/migration/Horde/Alarm/2_horde_alarms_params_blob.php b/framework/Alarm/migration/Horde/Alarm/2_horde_alarms_params_blob.php
new file mode 100644 (file)
index 0000000..aa61265
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+class HordeAlarmsParamsBlob extends Horde_Db_Migration_Base
+{
+    public function up()
+    {
+        $this->changeColumn('horde_alarms', 'alarm_params', 'binary');
+    }
+
+    public function down()
+    {
+        $this->changeColumn('horde_alarms', 'alarm_params', 'text');
+    }
+}
diff --git a/horde/scripts/upgrades/2010-12-23_horde_alarms_params_blob.sql b/horde/scripts/upgrades/2010-12-23_horde_alarms_params_blob.sql
new file mode 100644 (file)
index 0000000..ffc7fcb
--- /dev/null
@@ -0,0 +1 @@
+ALTER TABLE horde_alarms CHANGE COLUMN alarm_params alarm_params BLOB;