From d0f12989518b32c7bf9cb8093d57e49b038e8d70 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 4 Jun 2024 11:15:59 +0100 Subject: [PATCH] Bug 36986: (QA follow-up) Catch the case where someone already upgraded This adds a corresponding atomic update for the case where someone may have already upgraded past the version we're correcting in the prior patch. Signed-off-by: Martin Renvoize --- .../data/mysql/atomicupdate/bug_36986.pl | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_36986.pl diff --git a/installer/data/mysql/atomicupdate/bug_36986.pl b/installer/data/mysql/atomicupdate/bug_36986.pl new file mode 100644 index 0000000000..1c9d611d20 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36986.pl @@ -0,0 +1,23 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "36986", + description => "Rename StaffLoginLibraryBasedOnIP system preference", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + UPDATE systempreferences SET variable = "StaffLoginLibraryBasedOnIP" + WHERE variable = "StaffLoginBranchBasedOnIP" + } + ) == 1 + && say_success( + $out, + "Renamed system preference 'StaffLoginBranchBasedOnIP' to 'StaffLoginLibraryBasedOnIP'" + ); + + }, +}; -- 2.39.5