Bug 34438: Database update

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2023-10-31 17:52:51 +00:00 committed by Tomas Cohen Arazi
parent f88cb1da4f
commit bf249fc5fe
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,15 @@
use Modern::Perl;
return {
bug_number => "34438",
description => "Add lang to to the borrower_modifications table",
up => sub {
my ($args) = @_;
my $dbh = $args->{dbh};
if ( !column_exists( 'borrower_modifications', 'lang' ) ) {
$dbh->do(
"ALTER TABLE `borrower_modifications` ADD COLUMN `lang` VARCHAR(25) DEFAULT NULL AFTER `primary_contact_method`"
);
}
},
}

View file

@ -1451,6 +1451,7 @@ CREATE TABLE `borrower_modifications` (
`extended_attributes` mediumtext DEFAULT NULL,
`gdpr_proc_consent` datetime DEFAULT NULL COMMENT 'data processing consent',
`primary_contact_method` varchar(45) DEFAULT NULL COMMENT 'useful for reporting purposes',
`lang` varchar(25) DEFAULT NULL,
PRIMARY KEY (`verification_token`(191),`borrowernumber`),
KEY `verification_token` (`verification_token`(191)),
KEY `borrowernumber` (`borrowernumber`)