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 <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2023-09-18 15:24:35 +01:00 committed by Tomas Cohen Arazi
parent 91a5d20e24
commit 157bab3b90
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 11 additions and 2 deletions

View File

@ -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'";
}
},
};

View File

@ -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,