From e6d9ff76fe1cb78d0af9330e1095951d4b631a97 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 13 Aug 2021 07:44:34 -0400 Subject: [PATCH] Bug 28813: DBRev 21.05.02.002 Signed-off-by: Kyle M Hall --- 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 63fe1863c1..f0ab513dcb 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.05.02.001"; +$VERSION = "21.05.02.002"; 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 983718f6a9..4042fbbe8c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24397,6 +24397,23 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 28567, "Set to NULL empty branches fields"); } +$DBversion = '21.05.02.002'; +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