Bug 10269: Add reply_address field to message_queue table
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 25 Feb 2020 09:42:20 +0000 (09:42 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 18 Mar 2020 14:03:20 +0000 (14:03 +0000)
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
installer/data/mysql/atomicupdate/bug_10269.perl [new file with mode: 0644]
installer/data/mysql/kohastructure.sql

diff --git a/installer/data/mysql/atomicupdate/bug_10269.perl b/installer/data/mysql/atomicupdate/bug_10269.perl
new file mode 100644 (file)
index 0000000..0d52232
--- /dev/null
@@ -0,0 +1,9 @@
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+    if (!column_exists('message_queue', 'reply_address')) {
+        $dbh->do('ALTER TABLE message_queue ADD COLUMN reply_address LONGTEXT AFTER from_address');
+    }
+
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 22821 - Add reply_address to message_queue)\n";
+}
index 1f66a3c..a7d756a 100644 (file)
@@ -2380,6 +2380,7 @@ CREATE TABLE `message_queue` (
   `updated_on` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   `to_address` LONGTEXT,
   `from_address` LONGTEXT,
+  `reply_address` LONGTEXT,
   `content_type` MEDIUMTEXT,
   PRIMARY KEY `message_id` (`message_id`),
   KEY `borrowernumber` (`borrowernumber`),