From 6e1dbac8385de4dbbe3ff4aef525f61be13b755c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 11 Aug 2021 11:25:45 +0000 Subject: [PATCH] Bug 28813: DBRev 21.06.00.014 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_28813.perl | 17 ----------------- installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_28813.perl diff --git a/Koha.pm b/Koha.pm index 173f3f29f7..d420d7437d 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 = "21.06.00.013"; +$VERSION = "21.06.00.014"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_28813.perl b/installer/data/mysql/atomicupdate/bug_28813.perl deleted file mode 100644 index 972b405ea1..0000000000 --- a/installer/data/mysql/atomicupdate/bug_28813.perl +++ /dev/null @@ -1,17 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - if ( column_exists('message_queue', 'delivery_note') ) { - $dbh->do(q{ - ALTER TABLE message_queue CHANGE COLUMN delivery_note failure_code MEDIUMTEXT; - }); - } - - if( !column_exists( 'message_queue', 'failure_code' ) ) { - $dbh->do(q{ - ALTER TABLE message_queue ADD failure_code mediumtext AFTER content_type - }); - } - - # Always end with this (adjust the bug info) - NewVersion( $DBversion, 28813, "Update delivery_note to failure_code in message_queue"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index b326bcf55f..26ac11a869 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24580,6 +24580,23 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 22435, "Update existing offsets"); } +$DBversion = '21.06.00.014'; +if( CheckVersion( $DBversion ) ) { + if ( column_exists('message_queue', 'delivery_note') ) { + $dbh->do(q{ + ALTER TABLE message_queue CHANGE COLUMN delivery_note failure_code MEDIUMTEXT + }); + } + + if( !column_exists( 'message_queue', 'failure_code' ) ) { + $dbh->do(q{ + ALTER TABLE message_queue ADD failure_code mediumtext AFTER content_type + }); + } + + NewVersion( $DBversion, 28813, "Update delivery_note to failure_code in message_queue"); +} + # 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