From b15dbf86f7faf66fedad93759a81c086baaf8d25 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 10 Feb 2020 14:28:51 +0000 Subject: [PATCH] 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 Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer --- installer/data/mysql/atomicupdate/bug20882.perl | 8 ++++++++ installer/data/mysql/kohastructure.sql | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug20882.perl diff --git a/installer/data/mysql/atomicupdate/bug20882.perl b/installer/data/mysql/atomicupdate/bug20882.perl new file mode 100644 index 0000000000..5cbe8520db --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug20882.perl @@ -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"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 0aa3a9b784..d3a4cfa212 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -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) -- 2.11.0