From cb9cd28bac1eef9f24cff98f2bf1b05d3a76baf2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 1 Mar 2021 14:10:40 +0000 Subject: [PATCH] Bug 26937: DBRev 20.12.00.017 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/Bug26937.perl | 9 --------- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 3 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/Bug26937.perl diff --git a/Koha.pm b/Koha.pm index 914064a04a..d5804dbdd7 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 = "20.12.00.016"; +$VERSION = "20.12.00.017"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/Bug26937.perl b/installer/data/mysql/atomicupdate/Bug26937.perl deleted file mode 100644 index 4b22d44aeb..0000000000 --- a/installer/data/mysql/atomicupdate/Bug26937.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - # you can use $dbh here like: - $dbh->do( "INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CheckPrevCheckoutDelay','0', 'Maximum number of days that will trigger a warning if the patron has borrowed that item in the past when CheckPrevCheckout is enabled. Disabled if 0 or empty.', NULL, 'free')" ); - - # Always end with this (adjust the bug info) - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 26937 - Add CheckPrevCheckoutDelay system preference)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6d5b668205..07da3879e6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23558,6 +23558,16 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 8976, "Allow setting a default sequence of subfields in cataloguing editor" ); } +$DBversion = '20.12.00.017'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q| + INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) + VALUES ('CheckPrevCheckoutDelay','0', 'Maximum number of days that will trigger a warning if the patron has borrowed that item in the past when CheckPrevCheckout is enabled. Disabled if 0 or empty.', NULL, 'free') + |); + + NewVersion( $DBversion, 26937, "Add CheckPrevCheckoutDelay system preference)" ); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5