From 2823fee5cfb08cec398e9d02cfc9e1d65b8fde57 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 3 Apr 2020 14:04:48 +0100 Subject: [PATCH] Bug 24474: DBRev 19.12.00.061 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_24474.perl | 28 ------------------- installer/data/mysql/updatedatabase.pl | 28 +++++++++++++++++++ 3 files changed, 29 insertions(+), 29 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24474.perl diff --git a/Koha.pm b/Koha.pm index bc6030bc57..cdd737d596 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 = "19.12.00.060"; +$VERSION = "19.12.00.061"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24474.perl b/installer/data/mysql/atomicupdate/bug_24474.perl deleted file mode 100644 index c964d0c829..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24474.perl +++ /dev/null @@ -1,28 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if ( CheckVersion($DBversion) ) { - $dbh->do(q{ - UPDATE - systempreferences - SET - options = "batchmod|moredetail|cronjob|additem|pendingreserves|onpayment" - WHERE - variable = "MarkLostItemsAsReturned" - }); - - my $lost_item_returned = C4::Context->preference("MarkLostItemsAsReturned"); - my @set = split( ",", $lost_item_returned ); - push @set, 'onpayment'; - $lost_item_returned = join( ",", @set ); - - $dbh->do(qq{ - UPDATE - systempreferences - SET - value = "$lost_item_returned" - WHERE - variable = "MarkLostItemsAsReturned" - }); - - SetVersion($DBversion); - print "Upgrade to $DBversion done (Bug 24474 - Add `onpayment` option to MarkLostItemsAsReturned)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bbf268fd67..cfa0318787 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21397,6 +21397,34 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 23204, "Change enum order for marc_type in search_marc_map to fix sorting"); } +$DBversion = '19.12.00.061'; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + UPDATE + systempreferences + SET + options = "batchmod|moredetail|cronjob|additem|pendingreserves|onpayment" + WHERE + variable = "MarkLostItemsAsReturned" + }); + + my $lost_item_returned = C4::Context->preference("MarkLostItemsAsReturned"); + my @set = split( ",", $lost_item_returned ); + push @set, 'onpayment'; + $lost_item_returned = join( ",", @set ); + + $dbh->do(qq{ + UPDATE + systempreferences + SET + value = "$lost_item_returned" + WHERE + variable = "MarkLostItemsAsReturned" + }); + + NewVersion( $DBversion, 24474, "Add `onpayment` option to MarkLostItemsAsReturned"); +} + # 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