From bf249fc5fec6f1493490ee71b1e9bbb7dcfcc1d4 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 31 Oct 2023 17:52:51 +0000 Subject: [PATCH] Bug 34438: Database update Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_34438.pl | 15 +++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 16 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_34438.pl diff --git a/installer/data/mysql/atomicupdate/bug_34438.pl b/installer/data/mysql/atomicupdate/bug_34438.pl new file mode 100755 index 0000000000..10a12607f7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_34438.pl @@ -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`" + ); + } + }, + } diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 652f3da727..d0aa59933b 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -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`) -- 2.39.5