From 58075331a9e68db0539d59abb4f1a4f215a12120 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 24 Jul 2020 14:10:52 +0200 Subject: [PATCH] Bug 23092: DBRev 20.06.00.016 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_23092.perl | 18 ------------------ installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 19 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_23092.perl diff --git a/Koha.pm b/Koha.pm index b92e77a8dd..c761cbb86f 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.06.00.015"; +$VERSION = "20.06.00.016"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_23092.perl b/installer/data/mysql/atomicupdate/bug_23092.perl deleted file mode 100644 index a704bab866..0000000000 --- a/installer/data/mysql/atomicupdate/bug_23092.perl +++ /dev/null @@ -1,18 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - unless ( column_exists('branchtransfers', 'daterequested') ) { - $dbh->do( - qq{ - ALTER TABLE branchtransfers - ADD - `daterequested` timestamp NOT NULL default CURRENT_TIMESTAMP - AFTER - `itemnumber` - } - ); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 23092 - Add 'daterequested' field to transfers table)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6e52d232b4..12d810b485 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22474,6 +22474,23 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 23797, "Convert OpacLoginInstructions system preference to news block" ); } +$DBversion = '20.06.00.016'; +if( CheckVersion( $DBversion ) ) { + + unless ( column_exists('branchtransfers', 'daterequested') ) { + $dbh->do( + qq{ + ALTER TABLE branchtransfers + ADD + `daterequested` timestamp NOT NULL default CURRENT_TIMESTAMP + AFTER + `itemnumber` + } + ); + } + + NewVersion( $DBversion, 23092, "Add 'daterequested' field to transfers table" ); +} # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5