From ae5d4548f97b111a38098d1dc5158377d2b8c112 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 25 Feb 2020 09:42:20 +0000 Subject: [PATCH] Bug 10269: Add reply_address field to message_queue table Signed-off-by: Myka Kennedy Stephens Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- installer/data/mysql/atomicupdate/bug_10269.perl | 9 +++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 10 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_10269.perl diff --git a/installer/data/mysql/atomicupdate/bug_10269.perl b/installer/data/mysql/atomicupdate/bug_10269.perl new file mode 100644 index 0000000000..0d52232169 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_10269.perl @@ -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"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 1f66a3c3f3..a7d756a6fd 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -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`), -- 2.20.1