Bug 7144 followup DBrev number

This commit is contained in:
Paul Poulain 2012-03-21 10:40:16 +01:00
parent 9390382a46
commit 00bd409a9a
2 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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