Bugzilla – Attachment 3010 Details for
Bug 5642
Item field serial enumeration (enumchron) should be longer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Revised patch
patch.txt (text/plain), 2.57 KB, created by
Marcel de Rooy
on 2011-01-20 14:29:58 UTC
(
hide
)
Description:
Revised patch
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2011-01-20 14:29:58 UTC
Size:
2.57 KB
patch
obsolete
>From e15b58bd6cf510f2ad78dfe191685d6747f06f73 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 20 Jan 2011 15:20:22 +0100 >Subject: [PATCH] [REVISED] Bug 5642: Item field serial enumeration (enumchron) should be longer >Content-Type: text/plain; charset="utf-8" > >Field enumchron in items table is now varchar(80). >We have records that need a much longer field, even up to 400 or 500 chars. >I suggest to change its type to TEXT (variable length with max 64K; tinytext >goes up to 255 chars and is just too short). >Mediumtext or longtext are not needed; as a side note these types are used in >the items table for e.g. booksellerid and more_subfields_xml.. > >Revised original patch thanks to Ian Walls: update kohatructure.sql. Copied the change in deleteditems as well. >--- > 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 5e0c6b6..6d7137c 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -750,7 +750,7 @@ CREATE TABLE `deleteditems` ( > `uri` varchar(255) default NULL, > `itype` varchar(10) default NULL, > `more_subfields_xml` longtext default NULL, >- `enumchron` varchar(80) default NULL, >+ `enumchron` text default NULL, > `copynumber` varchar(32) default NULL, > `stocknumber` varchar(32) default NULL, > `marc` longblob, >@@ -1015,7 +1015,7 @@ CREATE TABLE `items` ( > `uri` varchar(255) default NULL, > `itype` varchar(10) default NULL, > `more_subfields_xml` longtext default NULL, >- `enumchron` varchar(80) default NULL, >+ `enumchron` text default NULL, > `copynumber` varchar(32) default NULL, > `stocknumber` varchar(32) default NULL, > PRIMARY KEY (`itemnumber`), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 5f3310b..e21dca4 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -3944,6 +3944,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = "3.03.00.XXX"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("ALTER TABLE items MODIFY enumchron TEXT"); >+ $dbh->do("ALTER TABLE deleteditems MODIFY enumchron TEXT"); >+ print "Upgrade to $DBversion done (bug 5642: longer serial enumeration)\n"; >+ SetVersion ($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >-- >1.6.0.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 5642
:
3007
| 3010