From 281c8e57d8c24e713d19d1aecad416ab1b507cb9 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Wed, 20 Nov 2013 14:42:04 +0100 Subject: [PATCH] Bug 6331 - Obsolete marc column in deleteditems There is a difference between "items" and "deleteditems" tables in "kohastructure.sql" : "deleteditems" has a field "marc" not existing in "items". This patch removes this obsolete column. --- installer/data/mysql/kohastructure.sql | 1 - installer/data/mysql/updatedatabase.pl | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index fefc985..d2968fd 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -912,7 +912,6 @@ CREATE TABLE `deleteditems` ( `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h) `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t) `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i) - `marc` longblob, -- unused in Koha PRIMARY KEY (`itemnumber`), KEY `delitembarcodeidx` (`barcode`), KEY `delitemstocknumberidx` (`stocknumber`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index db9bf95..64c44ae 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7750,6 +7750,12 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.13.00.XXX"; +if(CheckVersion($DBversion)) { + $dbh->do("ALTER TABLE deleteditems DROP COLUMN marc"); + print "Upgrade to $DBversion done (Bug 6331: Obsolete marc column in deleteditems)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS -- 1.8.3.2