Bug 7272 setting NULL to debarred field, to avoid having 0000-00-00
authorPaul Poulain <paul.poulain@biblibre.com>
Wed, 30 Nov 2011 13:53:48 +0000 (14:53 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 30 Nov 2011 16:07:07 +0000 (17:07 +0100)
0000-00-00 can come only from a problem in the 3.06.00.001 update

installer/data/mysql/updatedatabase.pl
kohaversion.pl

index efa9898..9ae0060 100755 (executable)
@@ -4564,6 +4564,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.06.00.002";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do("UPDATE borrowers SET debarred=NULL WHERE debarred='0000-00-00';");
+    print "Setting NULL to debarred where 0000-00-00 is stored (bug 7272)";
+    SetVersion($DBversion);
+}
+
 
 =head1 FUNCTIONS
 
index 61ff87f..7f2be15 100644 (file)
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.06.00.001';
+    our $VERSION = '3.06.00.002';
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install