From c7e421d9959cbe6c733acae89586a99da7e60e3c Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 17 Jun 2010 23:51:40 +0200 Subject: [PATCH] Bug 3682: change message_attributes.message_name from varchar(20) to varchar(40) Signed-off-by: Galen Charlton --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 9 ++++++++- kohaversion.pl | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 9d97edf712..d8ed27de14 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2154,7 +2154,7 @@ CREATE TABLE `message_transport_types` ( DROP TABLE IF EXISTS `message_attributes`; CREATE TABLE `message_attributes` ( `message_attribute_id` int(11) NOT NULL auto_increment, - `message_name` varchar(20) NOT NULL default '', + `message_name` varchar(40) NOT NULL default '', `takes_days` tinyint(1) NOT NULL default '0', PRIMARY KEY (`message_attribute_id`), UNIQUE KEY `message_name` (`message_name`) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7ea266eca5..adaab3e2d0 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3641,7 +3641,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } - $DBversion = "3.01.00.138"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do("DELETE FROM systempreferences WHERE variable = 'GranularPermissions'"); @@ -3649,6 +3648,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.01.00.XXX'; +if (C4::Context->preference('Version') < TransformToNum($DBversion)){ + $dbh->do("ALTER TABLE message_attributes CHANGE message_name message_name varchar(40);"); + print "Upgrade to $DBversion done (bug 3682: change message_name from varchar(20) to varchar(40))\n"; + SetVersion ($DBversion); +} + + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index 8da986bbfc..9925cdaa77 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,9 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.138'; + + our $VERSION = '3.01.00.XXX'; + # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5