Bugzilla – Attachment 5374 Details for
Bug 6761
Longer userid field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
With updated DB version xxx
0001-Bug-6761-Longer-userid-field-with-DBversion-3.05.00..patch (text/plain), 1.74 KB, created by
Amit Gupta
on 2011-09-09 06:20:24 UTC
(
hide
)
Description:
With updated DB version xxx
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2011-09-09 06:20:24 UTC
Size:
1.74 KB
patch
obsolete
>From 85a012000e1218a5c61d0a35b2787b36126c908e Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amit.gupta@osslabs.biz> >Date: Fri, 9 Sep 2011 11:47:59 +0530 >Subject: [PATCH] Bug 6761 - Longer userid field with $DBversion = "3.05.00.XXX"; > >Some libraries use email ids as userids. The current length of the userid field >is 30 and is not sufficient to accomodate some email addresses. >This change will increase the length to 75. >--- > installer/data/mysql/kohastructure.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > 2 files changed, 9 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 13fa53d..d5c91e4 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -244,7 +244,7 @@ CREATE TABLE `borrowers` ( > `sex` varchar(1) default NULL, > `password` varchar(30) default NULL, > `flags` int(11) default NULL, >- `userid` varchar(30) default NULL, >+ `userid` varchar(75) default NULL, > `opacnote` mediumtext, > `contactnote` varchar(255) default NULL, > `sort1` varchar(80) default NULL, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index bdfc9ac..76540ca 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4439,6 +4439,14 @@ 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 > >-- >1.6.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6761
:
5354
|
5374
|
5760