From eebc452ba98214960b28b720d695d282cbb876f6 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Sat, 1 Mar 2008 06:09:52 +1300 Subject: [PATCH] bumping to 058 : opac_news lang field was too short Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 11 +++++++++++ kohaversion.pl | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 17d0c6362c..1a821366c3 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1362,7 +1362,7 @@ CREATE TABLE `opac_news` ( `idnew` int(10) unsigned NOT NULL auto_increment, `title` varchar(250) NOT NULL default '', `new` text NOT NULL, - `lang` varchar(4) NOT NULL default '', + `lang` varchar(25) NOT NULL default '', `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, `expirationdate` date default NULL, `number` int(11) default NULL, diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 63508ca9c2..2d0d083d58 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -1059,6 +1059,17 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { } +$DBversion = "3.00.00.058"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `opac_news` + CHANGE `lang` `lang` VARCHAR( 25 ) + CHARACTER SET utf8 + COLLATE utf8_general_ci + NOT NULL "); + print "Upgrade to $DBversion done ( lang field in opac_news made longer )\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index b9cace6c01..440c6e33a3 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = "3.00.00.057"; + our $VERSION = "3.00.00.058"; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.2