From 98a50392900d7b7b6ef0fc187a26e3759844d095 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 17 Apr 2019 10:11:04 +0000 Subject: [PATCH] Bug 22044: DBRev 18.11.04.003 Signed-off-by: Nick Clemens (cherry picked from commit 4177d2e32942b16e65748852df881541406297bd) Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- ...et_default_value_for_NoRenewalBeforePrecision.perl | 10 ---------- installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 3 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_22044_set_default_value_for_NoRenewalBeforePrecision.perl diff --git a/Koha.pm b/Koha.pm index 516fe165f1..0d71cb8d3c 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 = "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 index 698afd3f73..0000000000 --- a/installer/data/mysql/atomicupdate/bug_22044_set_default_value_for_NoRenewalBeforePrecision.perl +++ /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"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ca923ff358..963176fa33 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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. -- 2.39.5