From 79d30205943dd3adeabd267bc729a63e69c0be30 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 7 May 2024 13:16:07 +0000 Subject: [PATCH] Bug 36396: DBRev 23.12.00.049 Signed-off-by: Katrin Fischer --- Koha.pm | 2 +- .../bug_36396.pl => db_revs/231200049.pl} | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) rename installer/data/mysql/{atomicupdate/bug_36396.pl => db_revs/231200049.pl} (50%) diff --git a/Koha.pm b/Koha.pm index a7eae8b91f..f486ef0104 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "23.12.00.048"; +$VERSION = "23.12.00.049"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_36396.pl b/installer/data/mysql/db_revs/231200049.pl similarity index 50% rename from installer/data/mysql/atomicupdate/bug_36396.pl rename to installer/data/mysql/db_revs/231200049.pl index ad78feb7da..07d5d15e37 100755 --- a/installer/data/mysql/atomicupdate/bug_36396.pl +++ b/installer/data/mysql/db_revs/231200049.pl @@ -2,17 +2,20 @@ use Modern::Perl; return { bug_number => "36396", - description => "Link elastic facets with authorized value categories", + description => "Link Elasticsearch facets with authorized value categories", up => sub { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; - $dbh->do( - q{ + unless ( column_exists( 'search_field', 'authorised_value_category' ) ) { + $dbh->do( + q{ ALTER TABLE search_field ADD COLUMN `authorised_value_category` varchar(32) DEFAULT NULL AFTER mandatory } - ); + ); + } + say $out "Added Elasticsearch facets with authorized value categories"; }, }; -- 2.39.5