Bug 23081: DBRev 19.05.10.002

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2020-05-14 21:49:28 +00:00
parent bd120a1391
commit dc9b62f8fd
3 changed files with 11 additions and 16 deletions

View File

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "19.05.10.001";
$VERSION = "19.05.10.002";
sub version {
return $VERSION;

View File

@ -1,15 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
# you can use $dbh here like:
$dbh->do( "UPDATE items set issues=0 where issues is null" );
$dbh->do( "UPDATE deleteditems set issues=0 where issues is null" );
$dbh->do( "ALTER TABLE items ALTER issues set default 0" );
$dbh->do( "ALTER TABLE deleteditems ALTER issues set default 0" );
# or perform some test and warn
# if( !column_exists( 'biblio', 'biblionumber' ) ) {
# warn "There is something wrong";
# }
# Always end with this (adjust the bug info)
NewVersion( $DBversion, 23081, "Set default to 0 for items.issues");
}

View File

@ -19041,6 +19041,16 @@ WHERE a.id < b.id AND a.borrowernumber IS NOT NULL AND a.borrowernumber=b.borrow
print "Upgrade to $DBversion done (Bug 20754: Remove double accepted list shares)\n";
}
$DBversion = '19.05.10.002';
if( CheckVersion( $DBversion ) ) {
$dbh->do( "UPDATE items set issues=0 where issues is null" );
$dbh->do( "UPDATE deleteditems set issues=0 where issues is null" );
$dbh->do( "ALTER TABLE items ALTER issues set default 0" );
$dbh->do( "ALTER TABLE deleteditems ALTER issues set default 0" );
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 23081: Set default to 0 for items.issues)\n";
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.