Bug 12230: DB changes - add issuingrules.maxsuspensiondays
authorJonathan Druart <jonathan.druart@biblibre.com>
Mon, 12 May 2014 10:40:05 +0000 (12:40 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 26 May 2014 01:39:48 +0000 (01:39 +0000)
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

index a2d1800..b46dc6a 100644 (file)
@@ -1147,6 +1147,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
index 9b17d9f..a6d5066 100755 (executable)
@@ -8526,6 +8526,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)