bump to 106, bug 2452, subscriptionhistory.enddate can be 0000-00-00
authorPaul POULAIN <paul.poulain@biblibre.com>
Sat, 2 Aug 2008 17:22:02 +0000 (19:22 +0200)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 4 Aug 2008 13:12:56 +0000 (08:12 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
installer/data/mysql/updatedatabase.pl
kohaversion.pl

index 43e0ef1..6f875e4 100755 (executable)
@@ -1921,6 +1921,15 @@ END_SQL
     SetVersion($DBversion);
 }
 
+$DBversion = "3.00.00.106";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("DELETE FROM systempreferences WHERE variable='noOPACHolds'");
+    print "Upgrade to $DBversion done (remove default '0000-00-00' in subscriptionhistory.enddate field)\n";
+    $dbh->do("ALTER TABLE `subscriptionhistory` CHANGE `enddate` `enddate` DATE NULL DEFAULT NULL ");
+    $dbh->do("UPDATE subscriptionhistory SET enddate=NULL WHERE enddate='0000-00-00'");
+    SetVersion ($DBversion);
+}
+
 =item DropAllForeignKeys($table)
 
   Drop all foreign keys of the table $table
index 69e1628..d8cfb9b 100644 (file)
@@ -10,7 +10,7 @@
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.00.00.105';
+    our $VERSION = '3.00.00.106';
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install