From 3c28c04d2510bab62cd30155a9cc5e4bd527a511 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Wed, 14 Sep 2022 14:51:51 +0300 Subject: [PATCH] Bug 16223: Add new columns to table restriction_types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- .../data/mysql/atomicupdate/bug_16223.pl | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_16223.pl diff --git a/installer/data/mysql/atomicupdate/bug_16223.pl b/installer/data/mysql/atomicupdate/bug_16223.pl new file mode 100755 index 00000000000..12aa40823ae --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_16223.pl @@ -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"; + }, +}; -- 2.42.0