From 4e936f9c42742894a64e96519bc646e0197c4f5e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 20 Feb 2014 06:26:25 -0500 Subject: [PATCH] Bug 5377: (follow-up) alter deletedbiblioitems to match biblioitems Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- installer/data/mysql/kohastructure.sql | 6 +++--- installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3e7eb79eb1..92ab713f15 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -757,8 +757,8 @@ CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records t `volume` mediumtext, `number` mediumtext, `itemtype` varchar(10) default NULL, -- biblio level item type (MARC21 942$c) - `isbn` varchar(30) default NULL, -- ISBN (MARC21 020$a) - `issn` varchar(9) default NULL, -- ISSN (MARC21 022$a) + `isbn` mediumtext default NULL, -- ISBN (MARC21 020$a) + `issn` mediumtext default NULL, -- ISSN (MARC21 022$a) `ean` varchar(13) default NULL, `publicationyear` text, `publishercode` varchar(255) default NULL, -- publisher (MARC21 260$b) @@ -790,7 +790,7 @@ CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records t KEY `bibinoidx` (`biblioitemnumber`), KEY `bibnoidx` (`biblionumber`), KEY `itemtype_idx` (`itemtype`), - KEY `isbn` (`isbn`), + KEY `isbn` (`isbn`(255)), KEY `publishercode` (`publishercode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 5d0a26ec48..7a01014120 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8425,6 +8425,17 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { ADD INDEX isbn ( isbn ( 255 ) ), ADD INDEX issn ( issn ( 255 ) ) "); + + $dbh->do("ALTER TABLE deletedbiblioitems DROP INDEX isbn"); + $dbh->do("ALTER TABLE deletedbiblioitems DROP INDEX issn"); + $dbh->do("ALTER TABLE deletedbiblioitems + CHANGE isbn isbn MEDIUMTEXT NULL DEFAULT NULL, + CHANGE issn issn MEDIUMTEXT NULL DEFAULT NULL + "); + $dbh->do("ALTER TABLE deletedbiblioitems + ADD INDEX isbn ( isbn ( 255 ) ) + "); + print "Upgrade to $DBversion done (Bug 11268 - Biblioitems URL field is too small for some URLs)\n"; SetVersion($DBversion); } -- 2.39.5