Bug 22044: DBRev 18.11.04.003
authorNick Clemens <nick@bywatersolutions.com>
Wed, 17 Apr 2019 10:11:04 +0000 (10:11 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 26 Apr 2019 11:55:39 +0000 (12:55 +0100)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4177d2e32942b16e65748852df881541406297bd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha.pm
installer/data/mysql/atomicupdate/bug_22044_set_default_value_for_NoRenewalBeforePrecision.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 516fe16..0d71cb8 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 = "18.11.04.002";
+$VERSION = "18.11.04.003";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_22044_set_default_value_for_NoRenewalBeforePrecision.perl b/installer/data/mysql/atomicupdate/bug_22044_set_default_value_for_NoRenewalBeforePrecision.perl
deleted file mode 100644 (file)
index 698afd3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-$DBversion = 'XXX';
-if( CheckVersion( $DBversion ) ) {
-    $dbh->do( q{
-        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
-        VALUES ('NoRenewalBeforePrecision', 'exact_time', 'Calculate "No renewal before" based on date or exact time. Only relevant for loans calculated in days, hourly loans are not affected.', 'date|exact_time', 'Choice');
-    });
-    $dbh->do("UPDATE systempreferences SET value='exact_time' WHERE variable='NoRenewalBeforePrecision' AND value IS NULL;" );
-    SetVersion( $DBversion );
-    print "Upgrade to $DBversion done (Bug 22044 - Set a default value for NoRenewalBeforePrecision)\n";
-}
index ca923ff..963176f 100755 (executable)
@@ -17379,6 +17379,17 @@ if( CheckVersion( $DBversion ) ) {
        print "Upgrade to $DBversion done (Bug 19670 - Change collation of marc_field to allow mixed case search field mappings)\n";
 }
 
+$DBversion = '18.11.04.003';
+if( CheckVersion( $DBversion ) ) {
+    $dbh->do( q{
+        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
+        VALUES ('NoRenewalBeforePrecision', 'exact_time', 'Calculate "No renewal before" based on date or exact time. Only relevant for loans calculated in days, hourly loans are not affected.', 'date|exact_time', 'Choice');
+    });
+    $dbh->do("UPDATE systempreferences SET value='exact_time' WHERE variable='NoRenewalBeforePrecision' AND value IS NULL;" );
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 22044 - Set a default value for NoRenewalBeforePrecision)\n";
+}
+
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.