Koha/installer/data/mysql/db_revs/230600024.pl
Tomas Cohen Arazi 2ff3b14e93
Bug 34720: DBRev 23.06.00.024
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-22 11:35:53 -03:00

18 lines
977 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "34720",
description => "Add system preference UpdateNotForLoanStatusOnCheckout",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
my $inserted = $dbh->do(
q{
INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type )
VALUES ('UpdateNotForLoanStatusOnCheckout', '', 'NULL', 'This is a list of value pairs. When an item is checked out, if the not for loan value on the left matches the items not for loan value it will be updated to the right-hand value. E.g. ''-1: 0'' will cause an item that was set to ''Ordered'' to now be available for loan. Each pair of values should be on a separate line.', 'Free')
}
);
say $out ( $inserted == 1 ) ? "Added new system preference 'UpdateNotForLoanStatusOnCheckout'" : "Skipped - System preference exists already in DB"
},
};