Bug 5642: Item field serial enumeration (enumchron) should be longer
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. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
ca8ae9b8cc
commit
fca88d102b
2 changed files with 10 additions and 2 deletions
|
@ -750,7 +750,7 @@ CREATE TABLE `deleteditems` (
|
||||||
`uri` varchar(255) default NULL,
|
`uri` varchar(255) default NULL,
|
||||||
`itype` varchar(10) default NULL,
|
`itype` varchar(10) default NULL,
|
||||||
`more_subfields_xml` longtext default NULL,
|
`more_subfields_xml` longtext default NULL,
|
||||||
`enumchron` varchar(80) default NULL,
|
`enumchron` text default NULL,
|
||||||
`copynumber` varchar(32) default NULL,
|
`copynumber` varchar(32) default NULL,
|
||||||
`stocknumber` varchar(32) default NULL,
|
`stocknumber` varchar(32) default NULL,
|
||||||
`marc` longblob,
|
`marc` longblob,
|
||||||
|
@ -1015,7 +1015,7 @@ CREATE TABLE `items` (
|
||||||
`uri` varchar(255) default NULL,
|
`uri` varchar(255) default NULL,
|
||||||
`itype` varchar(10) default NULL,
|
`itype` varchar(10) default NULL,
|
||||||
`more_subfields_xml` longtext default NULL,
|
`more_subfields_xml` longtext default NULL,
|
||||||
`enumchron` varchar(80) default NULL,
|
`enumchron` text default NULL,
|
||||||
`copynumber` varchar(32) default NULL,
|
`copynumber` varchar(32) default NULL,
|
||||||
`stocknumber` varchar(32) default NULL,
|
`stocknumber` varchar(32) default NULL,
|
||||||
PRIMARY KEY (`itemnumber`),
|
PRIMARY KEY (`itemnumber`),
|
||||||
|
|
|
@ -4022,6 +4022,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||||
SetVersion($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
|
=head1 FUNCTIONS
|
||||||
|
|
||||||
=head2 DropAllForeignKeys($table)
|
=head2 DropAllForeignKeys($table)
|
||||||
|
|
Loading…
Reference in a new issue