From 2a3ce8167e8894e6906bd51f7a9b757c2a02ed3f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 18 Sep 2023 15:24:35 +0100 Subject: [PATCH] Bug 12532: (QA follow-up) Add cc_address to message_queue Add the cc_address field to the message_queue so we may report back that an email was copied to the guarantor email addresses. Signed-off-by: Martin Renvoize --- .../bug_12532-RedirectGuaranteeEmail_syspref.pl | 12 ++++++++++-- installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_12532-RedirectGuaranteeEmail_syspref.pl b/installer/data/mysql/atomicupdate/bug_12532-RedirectGuaranteeEmail_syspref.pl index 36d29a5a5d7..cd1add64b38 100755 --- a/installer/data/mysql/atomicupdate/bug_12532-RedirectGuaranteeEmail_syspref.pl +++ b/installer/data/mysql/atomicupdate/bug_12532-RedirectGuaranteeEmail_syspref.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "12532", - description => "Add new system preference RedirectGuaranteeEmail", + description => "Add new system preference RedirectGuaranteeEmail and cc_address field", up => sub { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; @@ -13,7 +13,15 @@ return { VALUES ('RedirectGuaranteeEmail', '0', 'Enable the ability to redirect guarantee email messages to guarantor.', NULL, 'YesNo') } ); - say $out "Added system preference 'RedirectGuaranteeEmail'"; + + unless ( column_exists( 'message_queue', 'cc_address' ) ) { + $dbh->do(q{ + ALTER TABLE `message_queue` + ADD COLUMN `cc_address` longtext DEFAULT NULL + AFTER `to_address` + }); + say $out "Added column 'cc_address'"; + } }, }; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index add4518807e..8b423b5707a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4300,6 +4300,7 @@ CREATE TABLE `message_queue` ( `time_queued` timestamp NULL DEFAULT NULL, `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `to_address` longtext DEFAULT NULL, + `cc_address` longtext DEFAULT NULL, `from_address` longtext DEFAULT NULL, `reply_address` longtext DEFAULT NULL, `content_type` mediumtext DEFAULT NULL, -- 2.41.0