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 |
} |