From b29b77f7069c5afe5e8c578f0402e64a745d7456 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Sat, 2 Aug 2008 19:22:02 +0200 Subject: [PATCH] bump to 106, bug 2452, subscriptionhistory.enddate can be 0000-00-00 Signed-off-by: Joshua Ferraro --- installer/data/mysql/updatedatabase.pl | 9 +++++++++ kohaversion.pl | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 43e0ef1af9..6f875e4233 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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 diff --git a/kohaversion.pl b/kohaversion.pl index 69e1628f9e..d8cfb9b1d2 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -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 -- 2.39.5