From b7b6bf3bb5d6b4fb9b7493cef4b6e3385a5e53da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Tue, 19 Jan 2010 23:22:03 +0100 Subject: [PATCH] Rotating Collection > DB upgrade to 102 --- installer/data/mysql/updatedatabase.pl | 26 ++++++++++++++++++++++++++ kohaversion.pl | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a93bc5e7f8..32443a0ddb 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3346,6 +3346,32 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { } +$DBversion = "3.01.00.105"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(" + CREATE TABLE `collections` ( + `colId` int(11) NOT NULL auto_increment, + `colTitle` varchar(100) NOT NULL default '', + `colDesc` text NOT NULL, + `colBranchcode` varchar(4) default NULL COMMENT 'branchcode for branch where item should be held.', + PRIMARY KEY (`colId`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + "); + + $dbh->do(" + CREATE TABLE `collections_tracking` ( + `ctId` int(11) NOT NULL auto_increment, + `colId` int(11) NOT NULL default '0' COMMENT 'collections.colId', + `itemnumber` int(11) NOT NULL default '0' COMMENT 'items.itemnumber', + PRIMARY KEY (`ctId`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + "); + $dbh->do(" + INSERT INTO permissions (module_bit, code, description) + VALUES ( 13, 'rotating_collections', 'Manage Rotating collections')" ); + print "Upgrade to $DBversion done (added collection and collection_tracking tables for rotataing collection functionnality)\n"; + SetVersion ($DBversion); +} =item DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index 6329057d49..65f75f8d72 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.104'; + our $VERSION = '3.01.00.105'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5