From a51e4425571c0923750b99ed58575e2b9494a5cd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 30 Sep 2020 14:16:31 +0000 Subject: [PATCH] Bug 25776: DBRev 20.06.00.042 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../atomicupdate/bug-25776-letter_updated_on.perl | 12 ------------ installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 3 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug-25776-letter_updated_on.perl diff --git a/Koha.pm b/Koha.pm index f9e29d77f3..26a5ac404e 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.041"; +$VERSION = "20.06.00.042"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug-25776-letter_updated_on.perl b/installer/data/mysql/atomicupdate/bug-25776-letter_updated_on.perl deleted file mode 100644 index 802cb55f05..0000000000 --- a/installer/data/mysql/atomicupdate/bug-25776-letter_updated_on.perl +++ /dev/null @@ -1,12 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - unless ( column_exists('letter', 'updated_on') ) { - $dbh->do( - qq{ - ALTER TABLE letter ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER lang - } - ); - } - NewVersion( $DBversion, 25776, "Add letter.updated_on"); - -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index dde423d3be..1b6da8e8b0 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22856,6 +22856,17 @@ if ( CheckVersion($DBversion) ) { NewVersion( $DBversion, 26268, "Remove items.paidfor field" ); } +$DBversion = '20.06.00.042'; +if( CheckVersion( $DBversion ) ) { + unless ( column_exists('letter', 'updated_on') ) { + $dbh->do(q| + ALTER TABLE letter ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER lang + |); + } + + NewVersion( $DBversion, 25776, "Add letter.updated_on"); +} + # 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