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

(-)a/installer/data/mysql/atomicupdate/14187.perl (-6 / +12 lines)
Lines 1-8 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
1
$DBversion = '16.12.00.XXX';
2
if( CheckVersion( $DBversion )  ) {
2
if ( CheckVersion($DBversion) ) {
3
    $dbh->do("ALTER TABLE branchtransfers ADD COLUMN branchtransfer_id int(12) NOT NULL auto_increment FIRST, ADD CONSTRAINT PRIMARY KEY (branchtransfer_id);");
3
    unless (column_exists( 'branchtransfers', 'branchtransfer_id' )
4
        and index_exists( 'branchtransfers', 'PRIMARY' ) )
5
    {
6
        $dbh->do(
7
            "ALTER TABLE branchtransfers
8
                 ADD COLUMN branchtransfer_id int(12) NOT NULL auto_increment FIRST, ADD CONSTRAINT PRIMARY KEY (branchtransfer_id);"
9
        );
10
    }
4
11
5
    # Always end with this (adjust the bug info)
12
    # Always end with this (adjust the bug info)
6
    SetVersion( $DBversion );
13
    SetVersion($DBversion);
7
    print "Upgrade to $DBversion done (Bug 14187 - branchtransfer needs a primary key (id) for DBIx and common sense.)\n";
14
    print "Upgrade to $DBversion done (Bug 14187: branchtransfer needs a primary key (id) for DBIx and common sense.)\n";
8
}
15
}
9
- 

Return to bug 14187