From 9231cfdd5b34f56de802c87ec3f3a9f0e5796967 Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Tue, 3 Nov 2015 11:02:18 +0200 Subject: [PATCH] Bug 15108 - OAI-PMH provider improvements. AtomicUpdate. --- .../Bug15108-OAI-PMH_provider_improvements.pl | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.pl diff --git a/installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.pl b/installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.pl new file mode 100644 index 0000000..22b94fc --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +# Copyright Open Source Freedom Fighters +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 3 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use C4::Context; +use Koha::AtomicUpdater; + +my $dbh = C4::Context->dbh(); +my $atomicUpdater = Koha::AtomicUpdater->new(); + +unless($atomicUpdater->find('Bug15108')) { + + $dbh->do("ALTER TABLE biblioitems ADD KEY `timestamp_bibno` (`timestamp`, `biblionumber`);"); + $dbh->do("ALTER TABLE deletedbiblioitems ADD KEY `timestamp_bibno` (`timestamp`, `biblionumber`);"); + + print "Upgrade done (Bug 15108 - OAI-PMH provider improvements)\n"; +} -- 1.9.1