Bugzilla – Attachment 91256 Details for
Bug 18930
Move 'refund lost item fee rules' into the `circulation_rules` table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18930: (follow-up) Make DB update idempotent
Bug-18930-follow-up-Make-DB-update-idempotent.patch (text/plain), 1.78 KB, created by
Josef Moravec
on 2019-07-04 04:49:04 UTC
(
hide
)
Description:
Bug 18930: (follow-up) Make DB update idempotent
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-07-04 04:49:04 UTC
Size:
1.78 KB
patch
obsolete
>From 9259e836a9cb83021ec37a1291cc37d1b27e6bcc Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 6 Mar 2019 10:41:17 -0300 >Subject: [PATCH] Bug 18930: (follow-up) Make DB update idempotent > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > installer/data/mysql/atomicupdate/bug_18930.perl | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_18930.perl b/installer/data/mysql/atomicupdate/bug_18930.perl >index 99533dec2d..92be5bd260 100644 >--- a/installer/data/mysql/atomicupdate/bug_18930.perl >+++ b/installer/data/mysql/atomicupdate/bug_18930.perl >@@ -1,12 +1,15 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- if ( column_exists( 'refund_lost_item_fee_rules', 'refund' ) ) { >- $dbh->do(" >- INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) >- SELECT NULL, IF(branchcode='*', NULL, branchcode), NULL, 'refund', refund >- FROM refund_lost_item_fee_rules >- "); >- $dbh->do("DROP TABLE refund_lost_item_fee_rules"); >+ >+ if ( TableExists('refund_lost_item_fee_rules') ) { >+ if ( column_exists( 'refund_lost_item_fee_rules', 'refund' ) ) { >+ $dbh->do(" >+ INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) >+ SELECT NULL, IF(branchcode='*', NULL, branchcode), NULL, 'refund', refund >+ FROM refund_lost_item_fee_rules >+ "); >+ $dbh->do("DROP TABLE refund_lost_item_fee_rules"); >+ } > } > > SetVersion( $DBversion ); >-- >2.11.0
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 18930
:
65243
|
71007
|
81101
|
81148
|
82937
|
82938
|
85492
|
85493
|
86169
|
86170
|
86171
|
89404
|
89405
|
89406
|
90280
|
90281
|
90282
|
90283
|
90284
|
90285
|
90541
|
90542
|
90543
|
90544
|
90545
|
90546
|
90547
|
90548
|
90549
|
91254
|
91255
| 91256 |
91257
|
91258
|
91259
|
91260