Bugzilla – Attachment 52170 Details for
Bug 14048
Change RefundLostItemFeeOnReturn to be branch specific
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14048: (followup) move atomicupdate to SQL-based
Bug-14048-followup-move-atomicupdate-to-SQL-based.patch (text/plain), 4.78 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-06-07 19:11:15 UTC
(
hide
)
Description:
Bug 14048: (followup) move atomicupdate to SQL-based
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-06-07 19:11:15 UTC
Size:
4.78 KB
patch
obsolete
>From 31f6041dc36a6975481767dcf50ecf37797df341 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 7 Jun 2016 10:57:50 -0300 >Subject: [PATCH] Bug 14048: (followup) move atomicupdate to SQL-based > >Somehow, the atomic update wasn't working. I'll fill a different bug for that. >In the meantime this dev should move on as it doesn't strictly need the .perl >atomic update. >--- > .../bug_14048_refundlostitemfeeonreturn.perl | 31 -------------- > .../bug_14048_refundlostitemfeeonreturn.sql | 49 ++++++++++++++++++++++ > 2 files changed, 49 insertions(+), 31 deletions(-) > delete mode 100644 installer/data/mysql/atomicupdate/bug_14048_refundlostitemfeeonreturn.perl > create mode 100644 installer/data/mysql/atomicupdate/bug_14048_refundlostitemfeeonreturn.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_14048_refundlostitemfeeonreturn.perl b/installer/data/mysql/atomicupdate/bug_14048_refundlostitemfeeonreturn.perl >deleted file mode 100644 >index ad8fdad..0000000 >--- a/installer/data/mysql/atomicupdate/bug_14048_refundlostitemfeeonreturn.perl >+++ /dev/null >@@ -1,31 +0,0 @@ >-$DBversion = "16.06.00.XXX"; >-if ( CheckVersion($DBversion) ) { >- $dbh->do(q{ >- CREATE TABLE `refund_lost_item_fee_rules` ( >- `branchcode` varchar(10) NOT NULL default '', >- `refund` tinyint(1) NOT NULL default 0, >- PRIMARY KEY (`branchcode`) >- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >- }); >- $dbh->do(q{ >- INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) >- VALUES( 'RefundLostOnReturnControl', >- 'CheckinLibrary', >- 'If a lost item is returned, choose which branch to pick rules for refunding.', >- 'CheckinLibrary|PatronLibrary|ItemHomeBranch|ItemHoldingbranch', >- 'Choice') >- }); >- # Pick the old syspref as the default rule >- $dbh->do(q{ >- INSERT INTO refund_lost_item_fee_rules (branchcode,refund) >- SELECT '*', value FROM systempreferences WHERE variable='RefundLostItemFeeOnReturn' >- }); >- # Delete the old syspref >- $dbh->do(q{ >- DELETE IGNORE FROM systempreferences >- WHERE variable='RefundLostItemFeeOnReturn' >- }); >- >- print "Upgrade to $DBversion done (Bug 14048: Change RefundLostItemFeeOnReturn to be branch specific)\n"; >- SetVersion($DBversion); >-} >diff --git a/installer/data/mysql/atomicupdate/bug_14048_refundlostitemfeeonreturn.sql b/installer/data/mysql/atomicupdate/bug_14048_refundlostitemfeeonreturn.sql >new file mode 100644 >index 0000000..2f372fb >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_14048_refundlostitemfeeonreturn.sql >@@ -0,0 +1,49 @@ >+CREATE TABLE `refund_lost_item_fee_rules` ( >+ `branchcode` varchar(10) NOT NULL default '', >+ `refund` tinyint(1) NOT NULL default 0, >+ PRIMARY KEY (`branchcode`) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+ >+INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) >+VALUES( 'RefundLostOnReturnControl', >+ 'CheckinLibrary', >+ 'If a lost item is returned, choose which branch to pick rules for refunding.', >+ 'CheckinLibrary|PatronLibrary|ItemHomeBranch|ItemHoldingbranch', >+ 'Choice'); >+ >+INSERT INTO refund_lost_item_fee_rules (branchcode,refund) >+ SELECT '*', COALESCE(value,'1') FROM systempreferences WHERE variable='RefundLostItemFeeOnReturn'; >+ >+DELETE IGNORE FROM systempreferences; >+ >+-- $DBversion = "16.06.00.XXX"; >+-- if ( CheckVersion($DBversion) ) { >+-- $dbh->do(q{ >+-- CREATE TABLE `refund_lost_item_fee_rules` ( >+-- `branchcode` varchar(10) NOT NULL default '', >+-- `refund` tinyint(1) NOT NULL default 0, >+-- PRIMARY KEY (`branchcode`) >+-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+-- }); >+-- $dbh->do(q{ >+-- INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) >+-- VALUES( 'RefundLostOnReturnControl', >+-- 'CheckinLibrary', >+-- 'If a lost item is returned, choose which branch to pick rules for refunding.', >+-- 'CheckinLibrary|PatronLibrary|ItemHomeBranch|ItemHoldingbranch', >+-- 'Choice') >+-- }); >+-- # Pick the old syspref as the default rule >+-- $dbh->do(q{ >+-- INSERT INTO refund_lost_item_fee_rules (branchcode,refund) >+-- SELECT '*', COALESCE(value,'1') FROM systempreferences WHERE variable='RefundLostItemFeeOnReturn' >+-- }); >+-- # Delete the old syspref >+-- $dbh->do(q{ >+-- DELETE IGNORE FROM systempreferences >+-- WHERE variable='RefundLostItemFeeOnReturn' >+-- }); >+ >+-- print "Upgrade to $DBversion done (Bug 14048: Change RefundLostItemFeeOnReturn to be branch specific)\n"; >+-- SetVersion($DBversion); >+-- } >-- >2.8.4
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 14048
:
52016
|
52017
|
52018
|
52019
|
52020
|
52169
|
52170
|
52202
|
52203
|
52286
|
52287
|
52288
|
52289
|
52290
|
52291
|
52292
|
52293
|
52306
|
52444
|
52445
|
52446
|
52447
|
52448
|
52449
|
52450
|
52451
|
52482
|
52658
|
52659
|
52660
|
52661
|
52662
|
52663
|
52664
|
52665
|
52666
|
52667
|
52668
|
52748
|
52749
|
52750
|
52751
|
52752
|
52753
|
52754
|
52755
|
52756
|
52757
|
52835
|
52836
|
52837
|
52838
|
52839
|
52840
|
52841
|
52842
|
52843
|
52844
|
52876
|
52883
|
52894
|
53017
|
53018
|
53019
|
53020
|
53021
|
53022
|
53023
|
53024
|
53025
|
53026
|
53027
|
53028
|
53029