From 0d976bf9ee0438b79328fab39d47b10a365e5ae7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 12 May 2014 12:40:05 +0200 Subject: [PATCH] Bug 12230: DB changes - add issuingrules.maxsuspensiondays --- installer/data/mysql/kohastructure.sql | 1 + installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 92ab713..5742aa4 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1146,6 +1146,7 @@ CREATE TABLE `issuingrules` ( -- circulation and fine rules `reservecharge` decimal(28,6) default NULL, `fine` decimal(28,6) default NULL, -- fine amount `finedays` int(11) default NULL, -- suspension in days + `maxsuspensiondays` int(11) default NULL, -- max suspension days `firstremind` int(11) default NULL, -- fine grace period `chargeperiod` int(11) default NULL, -- how often the fine amount is charged `accountsent` int(11) default NULL, -- not used? always NULL diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3b1718c..3c0dacf 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8465,6 +8465,16 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.15.00.XXX"; +if(CheckVersion($DBversion)) { + $dbh->do(q| + ALTER TABLE issuingrules + ADD maxsuspensiondays INT(11) DEFAULT NULL AFTER finedays; + |); + print "Upgrade to $DBversion done (Bug 12230: Add new issuing rule maxsuspensiondays)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 1.7.10.4