From 1633f1a0874de74ebf19d038165fab822163209c Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Wed, 15 Jun 2016 16:38:55 +0200 Subject: [PATCH] Bug 15108: Remove Koha::AtomicUpdater dependency Content-Type: text/plain; charset=utf-8 Signed-off-by: Frederic Demians EDIT: Extension should be .perl [Otherwise it will not be executed at all.] This file is just temporary, needs no license. Followed the new skeleton file here. Signed-off-by: Marcel de Rooy --- .../Bug15108-OAI-PMH_provider_improvements.perl | 11 +++++++ .../Bug15108-OAI-PMH_provider_improvements.pl | 34 ---------------------- 2 files changed, 11 insertions(+), 34 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.perl delete mode 100644 installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.pl diff --git a/installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.perl b/installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.perl new file mode 100644 index 0000000..9a252cf --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.perl @@ -0,0 +1,11 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do("ALTER TABLE biblioitems ADD KEY `timestamp` (`timestamp`);"); + $dbh->do("ALTER TABLE deletedbiblioitems ADD KEY `timestamp` (`timestamp`);"); + $dbh->do("ALTER TABLE items ADD KEY `timestamp` (`timestamp`);"); + $dbh->do("ALTER TABLE deleteditems ADD KEY `timestamp` (`timestamp`);"); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 15108 - OAI-PMH provider improvements)\n"; +} diff --git a/installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.pl b/installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.pl deleted file mode 100644 index 46cf4d1..0000000 --- a/installer/data/mysql/atomicupdate/Bug15108-OAI-PMH_provider_improvements.pl +++ /dev/null @@ -1,34 +0,0 @@ -#!/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` (`timestamp`);"); - $dbh->do("ALTER TABLE deletedbiblioitems ADD KEY `timestamp` (`timestamp`);"); - $dbh->do("ALTER TABLE items ADD KEY `timestamp` (`timestamp`);"); - $dbh->do("ALTER TABLE deleteditems ADD KEY `timestamp` (`timestamp`);"); - - print "Upgrade done (Bug 15108 - OAI-PMH provider improvements)\n"; -} -- 2.1.4