Bug 40435: Database revision

Test plan:
[1] Run install or upgrade (updatedatabase.pl). Verify that pref was added to database.
* perl -MC4::Context -e'print C4::Context->preference('FutureHoldsBlockRenewals'),"\n"'
* You should see a zero printed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2025-12-11 16:27:01 +01:00 committed by Lucas Gass
parent 9f9fe699f3
commit f3978e5b1c
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_success say_info);
return {
bug_number => 40435,
description => "Add preference FutureHoldsBlockRenewals",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do(
q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
VALUES ('FutureHoldsBlockRenewals', 0, NULL, 'Allow future holds to block renewals', 'Integer' )}
);
say $out "Added new system preference 'FutureHoldsBlockRenewals'";
},
};

View File

@ -299,6 +299,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('ForceLibrarySelection','0',NULL,'Force staff to select a library when logging into the staff interface.','YesNo'),
('ForcePasswordResetWhenSetByStaff','0',NULL,'Force a staff created patron account to reset its password after its first OPAC login.','YesNo'),
('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
('FutureHoldsBlockRenewals', 0, NULL, 'Allow future holds to block renewals', 'Integer' ),
('GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 667$a field of MARC21 records', 'free'),
('GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field of MARC21 records', 'free'),
('GoogleJackets','0',NULL,'if ON, displays jacket covers from Google Books API','YesNo'),