Bugzilla – Attachment 11097 Details for
Bug 8431
Increase the borrower attribute field size from 64 characters to 255
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 8431 - Increase the borrower attribute field size from 64 characters to 255
Bug-8431---Increase-the-borrower-attribute-field-s.patch (text/plain), 2.39 KB, created by
Chris Cormack
on 2012-07-24 01:44:17 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8431 - Increase the borrower attribute field size from 64 characters to 255
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-07-24 01:44:17 UTC
Size:
2.39 KB
patch
obsolete
>From e4d53a52994cbb55bbb5d4a2005646819ec2a540 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 12 Jul 2012 11:29:10 -0400 >Subject: [PATCH] Bug 8431 - Increase the borrower attribute field size from > 64 characters to 255 > >Some libraries would like to store more verbose data in a borrower attribute field. >This commit increases the maximum length of a borrower attribute from 64 characters >to 255 characters. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > installer/data/mysql/kohastructure.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 7 +++++++ > 2 files changed, 8 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index fc9c5f0..99b1f87 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -301,7 +301,7 @@ DROP TABLE IF EXISTS `borrower_attributes`; > CREATE TABLE `borrower_attributes` ( -- values of custom patron fields known as extended patron attributes linked to patrons/borrowers > `borrowernumber` int(11) NOT NULL, -- foreign key from the borrowers table, defines which patron/borrower has this attribute > `code` varchar(10) NOT NULL, -- foreign key from the borrower_attribute_types table, defines which custom field this value was entered for >- `attribute` varchar(64) default NULL, -- custom patron field value >+ `attribute` varchar(255) default NULL, -- custom patron field value > `password` varchar(64) default NULL, -- password associated with this field > KEY `borrowernumber` (`borrowernumber`), > KEY `code_attribute` (`code`, `attribute`), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index dbceb8d..ad7aa69 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5556,6 +5556,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion ="3.09.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do("ALTER TABLE `borrower_attributes` CHANGE `attribute` `attribute` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL"); >+ print "Upgrade to $DBversion done (Increase the maximum size of a borrower attribute value)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.7.9.5
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 8431
:
10799
|
11088
| 11097 |
11113
|
11114
|
11150
|
11166
|
11167
|
11169
|
12106