From 7712afaea90e45123bb5e7de9e49b60df2830489 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 11 Nov 2024 11:05:46 +0000 Subject: [PATCH] Bug 28633: DBRev 24.06.00.058 Signed-off-by: Katrin Fischer --- Koha.pm | 2 +- .../bug_28633.pl => db_revs/240600058.pl} | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) rename installer/data/mysql/{atomicupdate/bug_28633.pl => db_revs/240600058.pl} (74%) diff --git a/Koha.pm b/Koha.pm index d5f9379e50..5d9f5d8249 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 = "24.06.00.057"; +$VERSION = "24.06.00.058"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_28633.pl b/installer/data/mysql/db_revs/240600058.pl similarity index 74% rename from installer/data/mysql/atomicupdate/bug_28633.pl rename to installer/data/mysql/db_revs/240600058.pl index 471d1af909..c56541a1e7 100755 --- a/installer/data/mysql/atomicupdate/bug_28633.pl +++ b/installer/data/mysql/db_revs/240600058.pl @@ -1,4 +1,5 @@ use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); return { bug_number => "28633", @@ -15,7 +16,7 @@ return { AFTER firstname } ); - say $out "Added column 'borrowers.preferred_name'"; + say_success( $out, "Added column 'borrowers.preferred_name'" ); } if ( !column_exists( 'deletedborrowers', 'preferred_name' ) ) { $dbh->do( @@ -26,7 +27,7 @@ return { AFTER firstname } ); - say $out "Added column 'deletedborrowers.preferred_name'"; + say_success( $out, "Added column 'deletedborrowers.preferred_name'" ); } if ( !column_exists( 'borrower_modifications', 'preferred_name' ) ) { $dbh->do( @@ -37,16 +38,19 @@ return { AFTER firstname } ); - say $out "Added column 'borrower_modifications.preferred_name'"; + say_success( $out, "Added column 'borrower_modifications.preferred_name'" ); } my @default_patron_search_fields = split( '\|', C4::Context->preference('DefaultPatronSearchFields') ); unless ( grep /preferred_name/, @default_patron_search_fields ) { if ( grep /firstname/, @default_patron_search_fields ) { push @default_patron_search_fields, 'preferred_name'; C4::Context->set_preference( 'DefaultPatronSearchFields', join( '|', @default_patron_search_fields ) ); - say $out "Added 'preferred_name' to DefaultPatronSearchFields"; + say_info( $out, "Added 'preferred_name' to DefaultPatronSearchFields" ); } else { - say $out "Please add 'preferred_name' to DefaultPatronSearchFields if you want it searched by default"; + say_info( + $out, + "Please add 'preferred_name' to 'DefaultPatronSearchFields' if you want it searched by default" + ); } } $dbh->do( @@ -56,6 +60,6 @@ return { WHERE preferred_name IS NULL } ); - say $out "Initially set preferred_name to firstname"; + say_success( $out, "Initially set 'preferred_name' to 'firstname'" ); }, }