Bugzilla – Attachment 24925 Details for
Bug 11268
Biblioitems URL field is too small for some URLs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11268 - Biblioitems URL field is too small for some URLs
Bug-11268---Biblioitems-URL-field-is-too-small-for.patch (text/plain), 3.07 KB, created by
Marcel de Rooy
on 2014-01-31 10:21:54 UTC
(
hide
)
Description:
Bug 11268 - Biblioitems URL field is too small for some URLs
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-01-31 10:21:54 UTC
Size:
3.07 KB
patch
obsolete
>From 98fe7babef9cee4d859f8e586ece822a63f38dda Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 18 Nov 2013 14:18:15 -0500 >Subject: [PATCH] Bug 11268 - Biblioitems URL field is too small for some URLs >Content-Type: text/plain; charset=utf-8 > >The URL field in biblioitems is defined as a varchar(255) which is large >enough for most URLs but not all. This field should be converted to a >TEXT field to make sure it is capable of storing all valid URLs. > >Test Plan: >1) Attempt to a URL that is greater than 255 chacters long in a record > (856$u in MARC21) >2) Save the record, note the url gets truncated >3) Apply this patch >4) Repeat step 1 >5) Note the entire url is saved > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/kohastructure.sql | 4 ++-- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > 2 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 136104f..363217b 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -173,7 +173,7 @@ CREATE TABLE `biblioitems` ( -- information related to bibliographic records in > `place` varchar(255) default NULL, -- publication place (MARC21 260$a) > `lccn` varchar(25) default NULL, -- library of congress control number (MARC21 010$a) > `marc` longblob, -- full bibliographic MARC record >- `url` varchar(255) default NULL, -- url (MARC21 856$u) >+ `url` text default NULL, -- url (MARC21 856$u) > `cn_source` varchar(10) default NULL, -- classification source (MARC21 942$2) > `cn_class` varchar(30) default NULL, > `cn_item` varchar(10) default NULL, >@@ -775,7 +775,7 @@ CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records t > `place` varchar(255) default NULL, -- publication place (MARC21 260$a) > `lccn` varchar(25) default NULL, -- library of congress control number (MARC21 010$a) > `marc` longblob, -- full bibliographic MARC record >- `url` varchar(255) default NULL, -- url (MARC21 856$u) >+ `url` text default NULL, -- url (MARC21 856$u) > `cn_source` varchar(10) default NULL, -- classification source (MARC21 942$2) > `cn_class` varchar(30) default NULL, > `cn_item` varchar(10) default NULL, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index f98daa7..470d83d 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7945,6 +7945,14 @@ if (CheckVersion($DBversion)) { > SetVersion($DBversion); > } > >+$DBversion = "3.15.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do("ALTER TABLE biblioitems CHANGE url url TEXT NULL DEFAULT NULL"); >+ $dbh->do("ALTER TABLE deletedbiblioitems CHANGE url url TEXT NULL DEFAULT NULL"); >+ print "Upgrade to $DBversion done (Bug 11268 - Biblioitems URL field is too small for some URLs)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.7.7.6
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 11268
:
23006
|
24741
| 24925