From b3fe04b22110aa142de6cb67e29d399a203ce7f0 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Tue, 4 Mar 2008 13:39:33 +1300 Subject: [PATCH] Fixing a little mixup in updatedatabase.pl we had 2 057 versions Signed-off-by: Joshua Ferraro --- installer/data/mysql/updatedatabase.pl | 26 ++++++++++++-------------- kohaversion.pl | 2 +- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 74861008b6..2816422952 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -1045,20 +1045,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } -$DBversion = "3.00.00.057"; -if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do("CREATE TABLE `patronimage` ( - `cardnumber` varchar(16) NOT NULL, - `mimetype` varchar(15) NOT NULL, - `imagefile` mediumblob NOT NULL, - PRIMARY KEY (`cardnumber`), - CONSTRAINT `patronimage_fk1` FOREIGN KEY (`cardnumber`) REFERENCES `borrowers` (`cardnumber`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - print "Upgrade to $DBversion done ( Added patronimage table. )\n"; - SetVersion ($DBversion); -} - - $DBversion = "3.00.00.058"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do("ALTER TABLE `opac_news` @@ -1096,6 +1082,18 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.00.00.060"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("CREATE TABLE IF NOT EXISTS `patronimage` ( + `cardnumber` varchar(16) NOT NULL, + `mimetype` varchar(15) NOT NULL, + `imagefile` mediumblob NOT NULL, + PRIMARY KEY (`cardnumber`), + CONSTRAINT `patronimage_fk1` FOREIGN KEY (`cardnumber`) REFERENCES `borrowers` (`cardnumber`) ON DELETE CASCADE ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + print "Upgrade to $DBversion done ( Added patronimage table. )\n"; + SetVersion ($DBversion); +} =item DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index 8482d04ced..d0592e445d 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = "3.00.00.059"; + our $VERSION = "3.00.00.060"; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5