[Koha-patches] [PATCH 1/9] (MT823) add the possibility to have enrolment end date

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Tue Feb 16 21:46:49 CET 2010


From: Nahuel ANGELINETTI <nahuel.angelinetti at biblibre.com>

this patch add the possibility to have an end date of enrolment, instead of a period. Like for a user category, all this category can have the same expiry date.
The librarian can configure one of both, but not both.
---
 installer/data/mysql/updatedatabase.pl |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 32ad48b..52a341a 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3445,6 +3445,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+$DBversion = '3.02.00.015';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do('ALTER TABLE `categories` ADD COLUMN `enrolmentperioddate` DATE NULL DEFAULT NULL AFTER `enrolmentperiod`');
+    print "Upgrade done (Add enrolment period date support)\n";
+    SetVersion ($DBversion);
+}
+
 =item DropAllForeignKeys($table)
 
   Drop all foreign keys of the table $table
-- 
1.6.3.3




More information about the Koha-patches mailing list