Koha/installer/data/mysql/db_revs/230600035.pl
Tomas Cohen Arazi f27ed123be
Bug 16223: DBRev 23.06.00.035
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:12 -03:00

34 lines
1 KiB
Perl
Executable file

use Modern::Perl;
return {
bug_number => "16223",
description => "Add new columns lift_after_payment and fee_limit to table restriction_types",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
if ( !column_exists( 'restriction_types', 'lift_after_payment' ) ) {
$dbh->do(
q{
ALTER TABLE restriction_types
ADD COLUMN `lift_after_payment` tinyint(1) NOT NULL DEFAULT 0
AFTER `is_default`
}
);
say $out "Added column 'restriction_types.lift_after_payment'";
}
if ( !column_exists( 'restriction_types', 'fee_limit' ) ) {
$dbh->do(
q{
ALTER TABLE restriction_types
ADD COLUMN `fee_limit` decimal(28,6) DEFAULT NULL
AFTER `lift_after_payment`
}
);
say $out "Added column 'restriction_types.fee_limit'";
}
},
};