From 3654fdaff3cd23c9e17441581fb9703b546e88eb Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 4 Feb 2026 16:52:34 +0000 Subject: [PATCH] Bug 41624: DB update to remove the pref --- .../data/mysql/atomicupdate/bug_41624.pl | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_41624.pl diff --git a/installer/data/mysql/atomicupdate/bug_41624.pl b/installer/data/mysql/atomicupdate/bug_41624.pl new file mode 100644 index 00000000000..4387a7f683a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_41624.pl @@ -0,0 +1,31 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "41624", + description => "Remove SeparateHoldingsByGroup system preference", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + # Check if the preference exists before removing + my ($exists) = $dbh->selectrow_array( + q{ + SELECT COUNT(*) + FROM systempreferences + WHERE variable = 'SeparateHoldingsByGroup' + } + ); + + if ($exists) { + $dbh->do( + q{ + DELETE FROM systempreferences + WHERE variable = 'SeparateHoldingsByGroup' + } + ); + } + + say_success( $out, "Removed system preference 'SeparateHoldingsByGroup'" ); + }, +}; -- 2.39.5