From 0d99ca8ac97396b5901cef6b498fe0609ab7a576 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 6 Oct 2015 11:18:32 -0300 Subject: [PATCH] Bug 6810: DBRev 3.21.00.034 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- ...6810-add_MembershipExpiryDaysNotice_syspref.sql | 1 - .../bug_6810-add_membershipexpiry_notification.sql | 1 - installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_6810-add_MembershipExpiryDaysNotice_syspref.sql delete mode 100644 installer/data/mysql/atomicupdate/bug_6810-add_membershipexpiry_notification.sql diff --git a/Koha.pm b/Koha.pm index 575340e1f9..57fbfd5a26 100644 --- 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 index bafa1b68fb..0000000000 --- a/installer/data/mysql/atomicupdate/bug_6810-add_MembershipExpiryDaysNotice_syspref.sql +++ /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 index 184a53300a..0000000000 --- a/installer/data/mysql/atomicupdate/bug_6810-add_membershipexpiry_notification.sql +++ /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 <> <> <>,\r\n\r\nYour library card will expire soon, on:\r\n\r\n<>\r\n\r\nThank you,\r\n\r\nLibrarian\r\n\r\n<>', 'email'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 617a63073d..e6d4f9a86e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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 <> <> <>,\r\n\r\nYour library card will expire soon, on:\r\n\r\n<>\r\n\r\nThank you,\r\n\r\nLibrarian\r\n\r\n<>', '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. -- 2.39.5