From faac1c973805e287d31b8ab725c8bddd4400ff71 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 13 Jun 2024 14:30:25 +0100 Subject: [PATCH] Bug 36330: DBRev 24.06.00.007 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../240600007.pl} | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) rename installer/data/mysql/{atomicupdate/bug36330-fix-typo-reseve.pl => db_revs/240600007.pl} (59%) mode change 100644 => 100755 diff --git a/Koha.pm b/Koha.pm index cb09e89ff6..10e576aef5 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 = "24.06.00.006"; +$VERSION = "24.06.00.007"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.pl b/installer/data/mysql/db_revs/240600007.pl old mode 100644 new mode 100755 similarity index 59% rename from installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.pl rename to installer/data/mysql/db_revs/240600007.pl index 8bf4690032..41be772460 --- a/installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.pl +++ b/installer/data/mysql/db_revs/240600007.pl @@ -9,14 +9,18 @@ return { my ( $dbh, $out ) = @$args{qw(dbh out)}; # Update columns, only changing the COMMENT - my $affected1 = $dbh->do(q{ ALTER TABLE course_items MODIFY `location` varchar(80) DEFAULT NULL COMMENT 'new shelving location for the item to have while on reserve (optional)' }); - if ( $affected1 ) { + my $affected1 = $dbh->do( + q{ ALTER TABLE course_items MODIFY `location` varchar(80) DEFAULT NULL COMMENT 'new shelving location for the item to have while on reserve (optional)' } + ); + if ($affected1) { say_success( $out, "Comment for course_items.location was updated." ); } else { say_failure( $out, "Comment for course_items.location was not updated." ); } - my $affected2 = $dbh->do(q{ ALTER TABLE course_items MODIFY `enabled` enum('yes','no') NOT NULL DEFAULT 'no' COMMENT 'if at least one enabled course has this item on reserve, this field will be ''yes'', otherwise it will be ''no''' }); - if ( $affected2 ) { + my $affected2 = $dbh->do( + q{ ALTER TABLE course_items MODIFY `enabled` enum('yes','no') NOT NULL DEFAULT 'no' COMMENT 'if at least one enabled course has this item on reserve, this field will be ''yes'', otherwise it will be ''no''' } + ); + if ($affected2) { say_success( $out, "Comment for course_items.enabled was updated." ); } else { say_failure( $out, "Comment for course_items.enabled was not updated." ); -- 2.39.5