bug 2799: DB rev 008 for library transfer limits
authorGalen Charlton <galen.charlton@liblime.com>
Wed, 17 Dec 2008 20:09:26 +0000 (14:09 -0600)
committerGalen Charlton <galen.charlton@liblime.com>
Wed, 17 Dec 2008 20:49:33 +0000 (14:49 -0600)
Also fix automatic merge that put the 008
update in the wrong place.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
installer/data/mysql/updatedatabase.pl
kohaversion.pl

index 0f4d461..ba53391 100755 (executable)
@@ -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
index 8adec16..9baede2 100644 (file)
@@ -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