From 4177d2e32942b16e65748852df881541406297bd 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.12.00.048 Signed-off-by: Nick Clemens --- 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 46dc84fc48..9f6047451b 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.12.00.047"; +$VERSION = "18.12.00.048"; 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 54c7889613..402114e4d2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -18024,6 +18024,17 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 14557: Add Libris spellchecking system preferences)\n"; } +$DBversion = '18.12.00.048'; +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.20.1