Bug 6810: DBRev 3.21.00.034
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 6 Oct 2015 14:18:32 +0000 (11:18 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 6 Oct 2015 14:18:32 +0000 (11:18 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha.pm
installer/data/mysql/atomicupdate/bug_6810-add_MembershipExpiryDaysNotice_syspref.sql [deleted file]
installer/data/mysql/atomicupdate/bug_6810-add_membershipexpiry_notification.sql [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 575340e..57fbfd5 100644 (file)
--- a/Koha.pm
+++ b/Koha.pm
@@ -29,7 +29,7 @@ use vars qw{ $VERSION };
 # - #4 : the developer version. The 4th number is the database subversion.
 #        used by developers when the database changes. updatedatabase take care of the changes itself
 #        and is automatically called by Auth.pm when needed.
-$VERSION = "3.21.00.033";
+$VERSION = "3.21.00.034";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_6810-add_MembershipExpiryDaysNotice_syspref.sql b/installer/data/mysql/atomicupdate/bug_6810-add_MembershipExpiryDaysNotice_syspref.sql
deleted file mode 100644 (file)
index bafa1b6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('MembershipExpiryDaysNotice',NULL,'Send an account expiration notice that a patron''s card is about to expire after',NULL,'Integer')
diff --git a/installer/data/mysql/atomicupdate/bug_6810-add_membershipexpiry_notification.sql b/installer/data/mysql/atomicupdate/bug_6810-add_membershipexpiry_notification.sql
deleted file mode 100644 (file)
index 184a533..0000000
+++ /dev/null
@@ -1 +0,0 @@
-INSERT IGNORE INTO letter (module, code, branchcode, name, title, content, message_transport_type) VALUES('members','MEMBERSHIP_EXPIRY','','Account expiration','Account expiration','Dear <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYour library card will expire soon, on:\r\n\r\n<<borrowers.dateexpiry>>\r\n\r\nThank you,\r\n\r\nLibrarian\r\n\r\n<<branches.branchname>>', 'email');
index 617a630..e6d4f9a 100755 (executable)
@@ -11040,6 +11040,20 @@ if ( CheckVersion($DBversion) ) {
     SetVersion ($DBversion);
 }
 
+$DBversion = "3.21.00.034";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
+        VALUES('MembershipExpiryDaysNotice',NULL,'Send an account expiration notice that a patron''s card is about to expire after',NULL,'Integer')
+    });
+    $dbh->do(q{
+        INSERT IGNORE INTO letter (module, code, branchcode, name, title, content, message_transport_type)
+        VALUES('members','MEMBERSHIP_EXPIRY','','Account expiration','Account expiration','Dear <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYour library card will expire soon, on:\r\n\r\n<<borrowers.dateexpiry>>\r\n\r\nThank you,\r\n\r\nLibrarian\r\n\r\n<<branches.branchname>>', 'email')
+    });
+    print "Upgrade to $DBversion done (Bug 6810: Send membership expiry reminder notices)\n";
+    SetVersion($DBversion);
+}
+
 # DEVELOPER PROCESS, search for anything to execute in the db_update directory
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.