From ccd42eee5b109cb7c935b0779a8321a5a8a872e0 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 21 Apr 2017 13:59:52 -0400 Subject: [PATCH] Bug 17669 - DBRev 16.12.00.025 Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug17669.perl | 14 -------------- installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug17669.perl diff --git a/Koha.pm b/Koha.pm index e96dd952c4..65e1c10ee5 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 = "16.12.00.024"; +$VERSION = "16.12.00.025"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug17669.perl b/installer/data/mysql/atomicupdate/bug17669.perl deleted file mode 100644 index d4c4f86449..0000000000 --- a/installer/data/mysql/atomicupdate/bug17669.perl +++ /dev/null @@ -1,14 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do(q| -INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('UploadPurgeTemporaryFilesDays','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer'); - |); - - my ( $cnt ) = $dbh->selectrow_array( "SELECT COUNT(*) FROM uploaded_files WHERE permanent IS NULL or permanent=0" ); - if( $cnt ) { - print "NOTE: You have $cnt temporary uploads. You could benefit from setting pref UploadPurgeTemporaryFilesDays now to automatically delete them.\n"; - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 17669 - Introduce preference for deleting temporary uploads)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4906137409..6abc32b529 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -14118,6 +14118,22 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 14537 - The system preference 'OverdueNoticeBcc' is mis-named.)\n"; } +$DBversion = '16.12.00.025'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q| + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) + VALUES ('UploadPurgeTemporaryFilesDays','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer'); + |); + + my ( $cnt ) = $dbh->selectrow_array( "SELECT COUNT(*) FROM uploaded_files WHERE permanent IS NULL or permanent=0" ); + if( $cnt ) { + print "NOTE: You have $cnt temporary uploads. You could benefit from setting pref UploadPurgeTemporaryFilesDays now to automatically delete them.\n"; + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 17669 - Introduce preference for deleting temporary uploads)\n"; +} + # 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