From 0c2b5a39a1be1d297d9524d46b50ba04d870879e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 9 Mar 2026 11:12:18 +0100 Subject: [PATCH] Bug 41932: Database revision for adding new preference Content-Type: text/plain; charset=utf-8 Test plan: Run install or upgrade. Signed-off-by: Marcel de Rooy --- .../data/mysql/atomicupdate/bug_41932.pl | 19 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + 2 files changed, 20 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_41932.pl diff --git a/installer/data/mysql/atomicupdate/bug_41932.pl b/installer/data/mysql/atomicupdate/bug_41932.pl new file mode 100755 index 0000000000..fc07b545dc --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_41932.pl @@ -0,0 +1,19 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "41932", + description => "Add syspref ClassSortGenericFormats", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('ClassSortGenericFormats','',NULL,'This supports zero-padding formats for cn_sort in the generic sort routine','Free') + } + ); + say_success( $out, "Added new system preferences 'ClassSortGenericFormats'" ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index f1357cd8ce..f3d5bbf15b 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -173,6 +173,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ClaimReturnedWarningThreshold', '', NULL, 'Sets the number of return claims past which the librarian will be warned the patron has many return claims', 'Integer'), ('ClaimsBccCopy','0',NULL,'Bcc the ClaimAcquisition and ClaimIssues alerts','YesNo'), ('ClaimsLog','1',NULL,'If ON, log all notices sent','YesNo'), +('ClassSortGenericFormats','',NULL,'This supports zero-padding formats for cn_sort in the generic sort routine','Free'), ('CleanUpDatabaseReturnClaims', '', NULL, 'Sets the age of resolved return claims to delete from the database for cleanup_database.pl', 'Integer'), ('CoceHost', '', NULL, 'Coce server URL', 'Free'), ('CoceProviders', '', 'aws,gb,ol', 'Coce providers', 'multiple'), -- 2.39.5