Bug 20882: Move items.uri to mediumtext

Applies to items and deleteditems.

Test plan:
Run new install or upgrade. Check field size.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Marcel de Rooy 2020-02-10 14:28:51 +00:00 committed by Martin Renvoize
parent 932596cc47
commit 5a685aa78f
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,8 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( "ALTER TABLE items MODIFY COLUMN uri MEDIUMTEXT" );
$dbh->do( "ALTER TABLE deleteditems MODIFY COLUMN uri MEDIUMTEXT" );
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 20882 - items.uri to MEDIUMTEXT)\n";
}

View File

@ -639,7 +639,7 @@ CREATE TABLE `deleteditems` (
`cn_sort` varchar(255) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting
`ccode` varchar(80) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
`materials` MEDIUMTEXT default NULL, -- materials specified (MARC21 952$3)
`uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
`uri` MEDIUMTEXT default NULL, -- URL for the item (MARC21 952$u)
`itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y)
`more_subfields_xml` LONGTEXT default NULL, -- additional 952 subfields in XML format
`enumchron` MEDIUMTEXT default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)
@ -844,7 +844,7 @@ CREATE TABLE `items` ( -- holdings/item information
`cn_sort` varchar(255) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting
`ccode` varchar(80) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
`materials` MEDIUMTEXT default NULL, -- materials specified (MARC21 952$3)
`uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
`uri` MEDIUMTEXT default NULL, -- URL for the item (MARC21 952$u)
`itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y)
`more_subfields_xml` LONGTEXT default NULL, -- additional 952 subfields in XML format
`enumchron` MEDIUMTEXT default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)