Bug 16223: Add new columns to table restriction_types
This patch adds two new columns, lift_after_payment and fee_limit, to table restriction_types. These colums are used to control lifting patrons restrictions after paying their fees. To test: 1. Apply this patch. 2. Update your database via updatedatabase.pl. => Confirm your table restriction_types has two new columns. Sponsored-by: Koha-Suomi Oy Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
ba8d05cbc8
commit
c894703b7c
1 changed files with 24 additions and 0 deletions
24
installer/data/mysql/atomicupdate/bug_16223.pl
Executable file
24
installer/data/mysql/atomicupdate/bug_16223.pl
Executable file
|
@ -0,0 +1,24 @@
|
|||
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
|
||||
});
|
||||
}
|
||||
say $out "Added column 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
|
||||
});
|
||||
}
|
||||
say $out "Added column fee_limit";
|
||||
},
|
||||
};
|
Loading…
Reference in a new issue