From 0e3ad130eaed7db3fd7d547a52420d3a3f70bc42 Mon Sep 17 00:00:00 2001 From: Joy Nelson Date: Fri, 8 May 2020 21:22:48 +0000 Subject: [PATCH] Bug 23081: DBRev 19.11.05.004 Signed-off-by: Joy Nelson --- Koha.pm | 2 +- installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Koha.pm b/Koha.pm index 8111089653..c98af681c2 100644 --- a/Koha.pm +++ b/Koha.pm @@ -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.11.05.003"; +$VERSION = "19.11.05.004"; sub version { return $VERSION; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7df5db1ad7..1452667276 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20501,6 +20501,17 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 25086: Set changed_fields column of borrower_modifications as nullable)\n"; } +$DBversion = '19.11.05.004'; +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. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5