From 876332b6765072656c0aacdd14010719fe841010 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 22 Jul 2024 10:27:20 +0100 Subject: [PATCH] Bug 13888: DBRev 24.06.00.017 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../240600017.pl} | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) rename installer/data/mysql/{atomicupdate/bug_13888-Add-extra-list-perms.pl => db_revs/240600017.pl} (56%) diff --git a/Koha.pm b/Koha.pm index 62865404ac..028d303cf0 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.016"; +$VERSION = "24.06.00.017"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_13888-Add-extra-list-perms.pl b/installer/data/mysql/db_revs/240600017.pl similarity index 56% rename from installer/data/mysql/atomicupdate/bug_13888-Add-extra-list-perms.pl rename to installer/data/mysql/db_revs/240600017.pl index 3d1bfd9c7c..7c89bf1dcf 100755 --- a/installer/data/mysql/atomicupdate/bug_13888-Add-extra-list-perms.pl +++ b/installer/data/mysql/db_revs/240600017.pl @@ -1,4 +1,5 @@ use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); return { bug_number => "13888", @@ -9,13 +10,15 @@ return { $dbh->do( q{ INSERT IGNORE INTO permissions (module_bit,code,description) VALUES (20, 'use_public_lists', 'Use public lists') } - ); - say $out "Added permission 'use_public_lists'"; + ) == 1 + ? say_success( $out, "Added permission 'use_public_lists'" ) + : say_info( $out, "Permission 'use_public_lists' already exists" ); $dbh->do( q{ INSERT IGNORE INTO permissions (module_bit,code,description) VALUES (20, 'create_public_lists', 'Create public lists') } - ); - say $out "Added permission 'create_public_lists'"; + ) == 1 + ? say_success( $out, "Added permission 'create_public_lists'" ) + : say_info( $out, "Permission 'create_public_lists' already exists" ); }, }; -- 2.39.5