From 00bd409a9a4e7576a2d5f613e7e86e26758ee287 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Wed, 21 Mar 2012 10:40:16 +0100 Subject: [PATCH] Bug 7144 followup DBrev number --- installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++++ kohaversion.pl | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4f21435578..a2335afb46 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4943,6 +4943,22 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.07.00.030"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("ALTER TABLE default_circ_rules ADD + COLUMN `returnbranch` varchar(15) default NULL AFTER `holdallowed`"); + $dbh->do("ALTER TABLE branch_item_rules ADD + COLUMN `returnbranch` varchar(15) default NULL AFTER `holdallowed`"); + $dbh->do("ALTER TABLE default_branch_circ_rules ADD + COLUMN `returnbranch` varchar(15) default NULL AFTER `holdallowed`"); + $dbh->do("ALTER TABLE default_branch_item_rules ADD + COLUMN `returnbranch` varchar(15) default NULL AFTER `holdallowed`"); + # set the default rule to the current value of HomeOrHoldingBranchReturn (default to 'homebranch' if need be) + my $homeorholdingbranchreturn = C4::Context->prefernce('HomeOrHoldingBranchReturn') || 'homebranch'; + $dbh->do("UPDATE default_circ_rules SET returnbranch = '$homeorholdingbranchreturn'"); + print "Upgrade to $DBversion done (Atomic update for OAI-PMH sets management)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS diff --git a/kohaversion.pl b/kohaversion.pl index d6c50ce685..4e5afa1ec1 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.07.00.029'; + our $VERSION = '3.07.00.030'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5