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

(-)a/installer/data/mysql/updatedatabase.pl (-2 / +15 lines)
Lines 7613-7620 CREATE TABLE borrower_debarments ( Link Here
7613
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
7613
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
7614
    });
7614
    });
7615
7615
7616
    # debarments with end date
7616
    $dbh->do(q{
7617
    $dbh->do(q{
7617
INSERT INTO borrower_debarments ( borrowernumber, expiration, comment ) SELECT borrowernumber, debarred, debarredcomment FROM borrowers WHERE debarred IS NOT NULL
7618
INSERT INTO borrower_debarments ( borrowernumber, expiration, comment ) SELECT borrowernumber, debarred, debarredcomment FROM borrowers WHERE debarred IS NOT NULL AND debarred <> '9999-12-31'
7619
    });
7620
    # debarments with no end date
7621
    $dbh->do(q{
7622
INSERT INTO borrower_debarments ( borrowernumber, comment ) SELECT borrowernumber, debarredcomment FROM borrowers WHERE debarred = '9999-12-31'
7618
    });
7623
    });
7619
7624
7620
    $dbh->do(q{
7625
    $dbh->do(q{
Lines 8012-8017 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
8012
    SetVersion($DBversion);
8017
    SetVersion($DBversion);
8013
}
8018
}
8014
8019
8020
$DBversion = "3.15.00.XXX";
8021
if ( CheckVersion($DBversion) ) {
8022
    $dbh->do(q{
8023
        UPDATE borrower_debarments SET debarred = NULL WHERE debarred = '9999-12-31'
8024
    });
8025
    print "Upgrade to $DBversion done (Bug 2720 - correct debarments with 9999-12-31)\n";
8026
    SetVersion($DBversion);
8027
}
8028
8015
=head1 FUNCTIONS
8029
=head1 FUNCTIONS
8016
8030
8017
=head2 TableExists($table)
8031
=head2 TableExists($table)
8018
- 

Return to bug 11846