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

(-)a/installer/data/mysql/atomicupdate/bug_17813_borrower_attributes_pk.perl (+14 lines)
Line 0 Link Here
1
$DBversion = "16.12.00.XXX";
2
if ( CheckVersion($DBversion) ) {
3
    unless (     column_exists( 'borrower_attributes', 'id' )
4
             and index_exists( 'borrower_attributes', 'PRIMARY' ) )
5
    {
6
        $dbh->do(q{
7
            ALTER TABLE `borrower_attributes`
8
                ADD `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
9
        });
10
    }
11
12
    print "Upgrade to $DBversion done (Bug 17813: Table borrower_attributes needs a primary key\n";
13
    SetVersion($DBversion);
14
}
(-)a/installer/data/mysql/atomicupdate/bug_17813_borrower_attributes_pk.sql (-12 lines)
Lines 1-11 Link Here
1
ALTER TABLE `borrower_attributes` ADD `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
2
3
-- $DBversion = "16.12.00.XXX";
4
-- if(CheckVersion($DBversion)) {
5
--     $dbh->do(q{
6
--         ALTER TABLE `borrower_attributes` ADD `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
7
--     });
8
--
9
--     print "Upgrade to $DBversion done (Bug 17813: Table borrower_attributes needs a primary key\n";
10
--     SetVersion ($DBversion);
11
-- }
12
- 

Return to bug 17813