Koha/installer/data/mysql/db_revs/240600016.pl
Katrin Fischer e81f7e2ef2
Bug 28924: DBRev 24.06.00.016
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-18 18:25:58 +02:00

31 lines
1.3 KiB
Perl
Executable file

use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
return {
bug_number => "28924",
description => "Adds columns to patron categories to allow category level values for the no issue charge sysprefs",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
unless ( column_exists( 'categories', 'noissuescharge' ) ) {
$dbh->do(
q{ ALTER TABLE categories ADD COLUMN `noissuescharge` int(11) AFTER `exclude_from_local_holds_priority` }
);
say_success( $out, "Added column 'noissuescharge' to categories" );
}
unless ( column_exists( 'categories', 'noissueschargeguarantees' ) ) {
$dbh->do(q{ ALTER TABLE categories ADD COLUMN `noissueschargeguarantees` int(11) AFTER `noissuescharge` });
say_success( $out, "Added column 'noissueschargeguarantees' to categories" );
}
unless ( column_exists( 'categories', 'noissueschargeguarantorswithguarantees' ) ) {
$dbh->do(
q{ ALTER TABLE categories ADD COLUMN `noissueschargeguarantorswithguarantees` int(11) AFTER `noissueschargeguarantees` }
);
say_success( $out, "Added column 'noissueschargeguarantorswithguarantees' to categories" );
}
},
};