View | Details | Raw Unified | Return to bug 18930
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_18930.perl (-8 / +10 lines)
Lines 1-12 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    if ( column_exists( 'refund_lost_item_fee_rules', 'refund' ) ) {
3
4
        $dbh->do("
4
    if ( TableExists('refund_lost_item_fee_rules') ) {
5
            INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value )
5
        if ( column_exists( 'refund_lost_item_fee_rules', 'refund' ) ) {
6
            SELECT NULL, IF(branchcode='*', NULL, branchcode), NULL, 'refund', refund
6
            $dbh->do("
7
            FROM refund_lost_item_fee_rules
7
                INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value )
8
        ");
8
                SELECT NULL, IF(branchcode='*', NULL, branchcode), NULL, 'refund', refund
9
        $dbh->do("DROP TABLE refund_lost_item_fee_rules");
9
                FROM refund_lost_item_fee_rules
10
            ");
11
            $dbh->do("DROP TABLE refund_lost_item_fee_rules");
12
        }
10
    }
13
    }
11
14
12
    SetVersion( $DBversion );
15
    SetVersion( $DBversion );
13
- 

Return to bug 18930