From 80e3bfd3763056b74e64c8ea628d7d201592cf52 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 3 Mar 2021 13:44:52 +0000 Subject: [PATCH] Bug 24446: DBRev 20.12.00.020 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_24446.perl | 20 ------------------- installer/data/mysql/updatedatabase.pl | 16 +++++++++++++++ 3 files changed, 17 insertions(+), 21 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24446.perl diff --git a/Koha.pm b/Koha.pm index faf03df754..15215dcbd6 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.019"; +$VERSION = "20.12.00.020"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24446.perl b/installer/data/mysql/atomicupdate/bug_24446.perl deleted file mode 100644 index c335f8adf7..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24446.perl +++ /dev/null @@ -1,20 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if ( CheckVersion($DBversion) ) { - - # Update daterequested from datesent for stockrotation - $dbh->do( - qq{ - UPDATE - `branchtransfers` - SET - `daterequested` = `datesent`, - `datesent` = NULL - WHERE - `reason` LIKE 'Stockrotation%' - AND - `datearrived` IS NULL - } - ); - - NewVersion( $DBversion, 24446, "Update stockrotation 'daterequested' field in transfers table" ); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 5cf9c9b7c3..9712b60a38 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23601,6 +23601,22 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 26057, "Add datecancelled field to branchtransfers"); } +$DBversion = '20.12.00.020'; +if ( CheckVersion($DBversion) ) { + + # Update daterequested from datesent for stockrotation + $dbh->do(q| + UPDATE `branchtransfers` + SET + `daterequested` = `datesent`, + `datesent` = NULL + WHERE `reason` LIKE 'Stockrotation%' + AND `datearrived` IS NULL + |); + + NewVersion( $DBversion, 24446, "Update stockrotation 'daterequested' field in transfers table" ); +} + # 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