From: Jonathan Druart Date: Thu, 25 Oct 2018 13:16:20 +0000 (-0300) Subject: Bug 18930: Do not insert '*' in circulation_rules X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=commitdiff_plain;h=5512f945059d1369e75c1952b5cb40b56fca0e80 Bug 18930: Do not insert '*' in circulation_rules We must insert NULL instead, otherwise the FK constraint will fail Signed-off-by: Tomas Cohen Arazi Signed-off-by: Agustin Moyano Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize --- diff --git a/installer/data/mysql/atomicupdate/bug_18930.perl b/installer/data/mysql/atomicupdate/bug_18930.perl index 3426d99..99533de 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");