From e5c6fc8a87468d861022f57b3a86ddd76d5e493f Mon Sep 17 00:00:00 2001 From: Amit Gupta Date: Fri, 7 Oct 2011 11:13:41 +0530 Subject: [PATCH] Bug 6761 - Longer userid field Signed-off-by: Ian Walls Signed-off-by: Chris Cormack --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3a51df55ed..c119ca1a55 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -244,7 +244,7 @@ CREATE TABLE `borrowers` ( -- this table includes information about your patrons `sex` varchar(1) default NULL, -- patron/borrower's gender `password` varchar(30) default NULL, -- patron/borrower's encrypted password `flags` int(11) default NULL, -- will include a number associated with the staff member's permissions - `userid` varchar(30) default NULL, -- patron/borrower's opac and/or staff client log in + `userid` varchar(75) default NULL, -- patron/borrower's opac and/or staff client log in `opacnote` mediumtext, -- a note on the patron/borrower's account that is visible in the OPAC and staff client `contactnote` varchar(255) default NULL, -- a note related to the patron/borrower's alternate address `sort1` varchar(80) default NULL, -- a field that can be used for any information unique to the library diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 74af41cad7..b5831fe00d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4459,6 +4459,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `borrowers` MODIFY `userid` VARCHAR(75)"); + print "Modified userid column length into 75 in borrowers\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS -- 2.39.2