Bugzilla – Attachment 143670 Details for
Bug 16223
Automatically remove any borrower debarments after a payment
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16223: Add new columns to table restriction_types
Bug-16223-Add-new-columns-to-table-restrictiontype.patch (text/plain), 2.59 KB, created by
PTFS Europe Sandboxes
on 2022-11-10 14:49:58 UTC
(
hide
)
Description:
Bug 16223: Add new columns to table restriction_types
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2022-11-10 14:49:58 UTC
Size:
2.59 KB
patch
obsolete
>From a5492f3ddfc2b434085297e9d21d959901d70c07 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >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 <anneli.osterman@koha-suomi.fi> >--- > .../data/mysql/atomicupdate/bug_16223.pl | 24 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 26 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 0000000000..12aa40823a >--- /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"; >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 54ed708304..4570317e92 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2139,6 +2139,8 @@ CREATE TABLE `restriction_types` ( > `display_text` text NOT NULL, > `is_system` tinyint(1) NOT NULL DEFAULT 0, > `is_default` tinyint(1) NOT NULL DEFAULT 0, >+ `lift_after_payment` tinyint(1) NOT NULL DEFAULT 0, >+ `fee_limit` decimal(28,6) DEFAULT NULL > PRIMARY KEY (`code`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16223
:
50078
|
50084
|
99697
|
99698
|
104399
|
104400
|
114272
|
114273
|
118526
|
118572
|
118574
|
118575
|
122768
|
122769
|
127252
|
128005
|
132284
|
132285
|
132286
|
132287
|
143388
|
143389
|
143390
|
143462
|
143670
|
143671
|
143672
|
143688
|
143689
|
143690
|
143765
|
143766
|
143767
|
143768
|
143769
|
143770
|
143936
|
146051
|
146052
|
146053
|
146054
|
146055
|
146056
|
146057
|
148307
|
148308
|
148309
|
148310
|
148311
|
148312
|
148313
|
150024
|
150025
|
150026
|
150027
|
150028
|
150029
|
153024
|
153025
|
153026
|
153027
|
153028
|
153029
|
155644
|
155645
|
155646
|
155647
|
155648
|
155649
|
155650
|
156841
|
156842
|
156843
|
156844
|
156845
|
156846
|
156847
|
156848
|
156849
|
156850