From 0339498196249fa958b540ebbc2486e3dd55611a Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 17 Dec 2008 14:09:26 -0600 Subject: [PATCH] bug 2799: DB rev 008 for library transfer limits Also fix automatic merge that put the 008 update in the wrong place. Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 36 ++++++++++++++------------ kohaversion.pl | 2 +- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 0f4d461283..ba533919f9 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2031,23 +2031,6 @@ if ( C4::Context->preference('Version') < TransformToNum($DBversion) ) { } print "Upgrade to $DBversion done (bug 2582: set null issues.issuedate to lastreneweddate)\n"; SetVersion($DBversion); - -$DBversion = '3.01.00.008'; -if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - - $dbh->do("CREATE TABLE branch_transfer_limits ( - limitId int(8) NOT NULL auto_increment, - toBranch varchar(4) NOT NULL, - fromBranch varchar(4) NOT NULL, - itemtype varchar(4) NOT NULL, - PRIMARY KEY (limitId) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8" - ); - - $dbh->do("INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'UseBranchTransferLimits', '0', '', 'If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.', 'YesNo')"); - - print "Upgrade to $DBversion done (added branch_transfer_limits table and UseBranchTransferLimits system preference)\n"; - SetVersion ($DBversion); } $DBversion = "3.01.00.003"; @@ -2112,6 +2095,25 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.01.00.008'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + + $dbh->do("CREATE TABLE branch_transfer_limits ( + limitId int(8) NOT NULL auto_increment, + toBranch varchar(4) NOT NULL, + fromBranch varchar(4) NOT NULL, + itemtype varchar(4) NOT NULL, + PRIMARY KEY (limitId) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8" + ); + + $dbh->do("INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'UseBranchTransferLimits', '0', '', 'If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.', 'YesNo')"); + + print "Upgrade to $DBversion done (added branch_transfer_limits table and UseBranchTransferLimits system preference)\n"; + SetVersion ($DBversion); +} + + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index 8adec161fb..9baede23fc 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.007'; + our $VERSION = '3.01.00.008'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5