Koha/installer/data/mysql/db_revs/230600027.pl
Tomas Cohen Arazi f4b47321f4
Bug 29145: DBRev 23.06.00.027
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-03 09:24:45 -04:00

16 lines
832 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "29145",
description => "Change type of AutoRemoveOverduesRestrictions system preference",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
# Do you stuffs here
$dbh->do(
q{UPDATE `systempreferences` SET `type` = 'Choice', `options` = 'no|when_no_overdue|when_no_overdue_causing_debarment', `explanation` = 'Defines if and on what conditions OVERDUES debarments should automatically be lifted when overdue items are returned by the patron.', `value` = CASE `value` WHEN '1' THEN 'when_no_overdue' WHEN '0' THEN 'no' ELSE `value` END WHERE variable = 'AutoRemoveOverduesRestrictions'}
);
say $out "Type of AutoRemoveOverduesRestrictions system preference has been changed";
},
}