From ac845eaf90c1e11fff6314d8175de8cdd868b818 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 25 Oct 2018 10:16:20 -0300 Subject: [PATCH] Bug 18930: Do not insert '*' in circulation_rules We must insert NULL instead, otherwise the FK constraint will fail --- installer/data/mysql/atomicupdate/bug_18930.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_18930.perl b/installer/data/mysql/atomicupdate/bug_18930.perl index 3426d994fa..99533dec2d 100644 --- a/installer/data/mysql/atomicupdate/bug_18930.perl +++ b/installer/data/mysql/atomicupdate/bug_18930.perl @@ -3,7 +3,7 @@ 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, branchcode, NULL, 'refund', refund + SELECT NULL, IF(branchcode='*', NULL, branchcode), NULL, 'refund', refund FROM refund_lost_item_fee_rules "); $dbh->do("DROP TABLE refund_lost_item_fee_rules"); -- 2.11.0