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 8106-8111 if(CheckVersion($DBversion)) { Link Here
8106
    SetVersion($DBversion);
8111
    SetVersion($DBversion);
8107
}
8112
}
8108
8113
8114
$DBversion = "3.15.00.XXX";
8115
if ( CheckVersion($DBversion) ) {
8116
    $dbh->do(q{
8117
        UPDATE borrower_debarments SET expiration = NULL WHERE expiration = '9999-12-31'
8118
    });
8119
    print "Upgrade to $DBversion done (Bug 11846 - correct borrower_debarments with expiration 9999-12-31)\n";
8120
    SetVersion($DBversion);
8121
}
8122
8109
=head1 FUNCTIONS
8123
=head1 FUNCTIONS
8110
8124
8111
=head2 TableExists($table)
8125
=head2 TableExists($table)
8112
- 

Return to bug 11846