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

(-)a/installer/data/mysql/atomicupdate/bug_23081-change-default-of-issues-field.perl (-1 / +15 lines)
Line 0 Link Here
0
- 
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
4
     $dbh->do( "UPDATE items set issues=0 where issues is null" );
5
     $dbh->do( "UPDATE deleteditems set issues=0 where issues is null" );
6
     $dbh->do( "ALTER TABLE items ALTER issues set default 0" );
7
     $dbh->do( "ALTER TABLE deleteditems ALTER issues set default 0" );
8
    # or perform some test and warn
9
    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
10
    #    warn "There is something wrong";
11
    # }
12
13
    # Always end with this (adjust the bug info)
14
    NewVersion( $DBversion, 23081, "Set default to 0 for items.issues");
15
}

Return to bug 23081