From 157bab3b90356b38afe4573a5653736737cd46be 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 Signed-off-by: Tomas Cohen Arazi --- .../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 36d29a5a5d..cd1add64b3 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 9c1b45ac45..daaf3926ef 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4301,6 +4301,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.39.5