From f198b3f5cf45f6827de32d5e6700f70a6c9e43c5 Mon Sep 17 00:00:00 2001 From: Danny Bouman Date: Wed, 19 Nov 2008 15:58:42 -0500 Subject: [PATCH] bug 2687: Increased length of borrower attribute fields Signed-off-by: Galen Charlton --- installer/data/mysql/kohastructure.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 8 ++++++++ kohaversion.pl | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index a8d4e8dea7..fbcfb6be86 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -522,8 +522,8 @@ DROP TABLE IF EXISTS `borrower_attributes`; CREATE TABLE `borrower_attributes` ( `borrowernumber` int(11) NOT NULL, `code` varchar(10) NOT NULL, - `attribute` varchar(30) default NULL, - `password` varchar(30) default NULL, + `attribute` varchar(64) default NULL, + `password` varchar(64) default NULL, KEY `borrowernumber` (`borrowernumber`), KEY `code_attribute` (`code`, `attribute`), CONSTRAINT `borrower_attributes_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f787eeefc3..793f199642 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2123,6 +2123,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.01.00.010'; +if ( C4::Context->preference('Version') < TransformToNum($DBversion) ) { + $dbh->do("ALTER TABLE `borrower_attributes` MODIFY COLUMN `attribute` VARCHAR(64) DEFAULT NULL"); + $dbh->do("ALTER TABLE `borrower_attributes` MODIFY COLUMN `password` VARCHAR(64) DEFAULT NULL"); + print "Upgrade to $DBversion done (bug 2687: increase length of borrower attribute fields)\n"; + SetVersion($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index 510a3c3ccb..30ae2b4e53 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.009'; + our $VERSION = '3.01.00.010'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5