From 2873228cd463c40809e2a70a93aa31e4c9360cb0 Mon Sep 17 00:00:00 2001
From: David Nind <david@davidnind.com>
Date: Mon, 16 Dec 2024 19:34:10 +0000
Subject: [PATCH] Bug 38448: Fix inconsistencies in database update messages
Content-Type: text/plain; charset=utf-8

This fixes some database update messages to improve their
consistency with the database update guidelines
https://wiki.koha-community.org/wiki/Database_updates

Test plan:
1. Apply the patch.
2. Review the differences to make sure the messages make
   sense and are consistent with the database update
   guidelines:
   2.1 Review the diff attached to the bug
   or
   2.2 Run: git show
3. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Leo Stoyanov <leo.stoyanov@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
---
 installer/data/mysql/db_revs/240600018.pl | 10 +++++-----
 installer/data/mysql/db_revs/240600032.pl |  2 +-
 installer/data/mysql/db_revs/240600033.pl |  2 +-
 installer/data/mysql/db_revs/240600046.pl |  2 +-
 installer/data/mysql/db_revs/240600047.pl |  3 +--
 5 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/installer/data/mysql/db_revs/240600018.pl b/installer/data/mysql/db_revs/240600018.pl
index 5b52811874..d5ec1be40c 100755
--- a/installer/data/mysql/db_revs/240600018.pl
+++ b/installer/data/mysql/db_revs/240600018.pl
@@ -28,7 +28,7 @@ return {
         foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); $count++; }
 
         if ($count) {
-            say_info( $out, "list_borrowers added to $count users with edit_borrowers" );
+            say_info( $out, "Added permission 'list_borrowers' to $count users with 'edit_borrowers' permissions" );
         }
 
         # Check for 'circulate' or 'circulate > manage_bookings' permission
@@ -44,7 +44,7 @@ return {
         foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); $count++; }
 
         if ($count) {
-            say_info( $out, "list_borrowers added to $count users with manage_bookings" );
+            say_info( $out, "Added permission 'list_borrowers' to $count users with 'manage_bookings' permissions" );
         }
 
         # Check for 'tools' or 'tools > label_creator' permission
@@ -60,7 +60,7 @@ return {
         foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); $count++; }
 
         if ($count) {
-            say_info( $out, "list_borrowers added to $count users with label_creator" );
+            say_info( $out, "Added permission 'list_borrowers' to $count users with 'label_creator' permissions" );
         }
 
         # Check for 'serials' or 'serials > routing' permission
@@ -76,7 +76,7 @@ return {
         foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); $count++ }
 
         if ($count) {
-            say_info( $out, "list_borrowers added to $count users with routing" );
+            say_info( $out, "Added permission 'list_borrowers' to $count users with 'routing' permissions" );
         }
 
         # Check for 'acquisitions' or 'acquisitions > order_manage' permission
@@ -92,7 +92,7 @@ return {
         foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); $count++ }
 
         if ($count) {
-            say_info( $out, "list_borrowers added to $count users with order_manage" );
+            say_info( $out, "Added permission 'list_borrowers' to $count users with 'order_manage' permissions" );
         }
     },
 };
diff --git a/installer/data/mysql/db_revs/240600032.pl b/installer/data/mysql/db_revs/240600032.pl
index 706f12e7f7..babc6a91b0 100755
--- a/installer/data/mysql/db_revs/240600032.pl
+++ b/installer/data/mysql/db_revs/240600032.pl
@@ -14,7 +14,7 @@ return {
               ALTER TABLE erm_usage_data_providers ADD COLUMN `service_platform` varchar(80) DEFAULT NULL COMMENT 'platform if provider requires it' AFTER `report_types`
           }
             );
-            say_info( $out, "Added column 'service_platformerm_usage_data_providers'" );
+            say_success( $out, "Added column 'service_platformerm_usage_data_providers'" );
         }
     },
 };
diff --git a/installer/data/mysql/db_revs/240600033.pl b/installer/data/mysql/db_revs/240600033.pl
index bde2003c94..55fcd8144c 100755
--- a/installer/data/mysql/db_revs/240600033.pl
+++ b/installer/data/mysql/db_revs/240600033.pl
@@ -17,6 +17,6 @@ return {
         }
         );
 
-        say $out "Added new system preference 'JobsNotificationMethod'";
+        say_success( $out, "Added new system preference 'JobsNotificationMethod'" );
     },
 };
diff --git a/installer/data/mysql/db_revs/240600046.pl b/installer/data/mysql/db_revs/240600046.pl
index 3da8c281ca..a837bf1218 100755
--- a/installer/data/mysql/db_revs/240600046.pl
+++ b/installer/data/mysql/db_revs/240600046.pl
@@ -15,6 +15,6 @@ return {
                 ('BOOKING_CANCELLATION', 1)
             }
         );
-        say_success( $out, "Added BOOKING_CANCELLATION authorised value category" );
+        say_success( $out, "Added new authorized value category 'BOOKING_CANCELLATION'" );
     },
 };
diff --git a/installer/data/mysql/db_revs/240600047.pl b/installer/data/mysql/db_revs/240600047.pl
index 1a34b91e8d..6b2714391c 100755
--- a/installer/data/mysql/db_revs/240600047.pl
+++ b/installer/data/mysql/db_revs/240600047.pl
@@ -71,7 +71,6 @@ return {
             UPDATE `permissions` SET description='Manage Z39.50 and SRU servers, OAI repositories configuration' WHERE code='manage_search_targets';
         }
         );
-        say_success( $out, "Updated manage_search_targets permission description" );
 
         $dbh->do(
             q{
@@ -79,7 +78,7 @@ return {
             ('OAI-PMH:HarvestEmailReport','','','After an OAI-PMH harvest, send a report email to the email address','Free');
         }
         );
-        say_success( $out, "Added OAI-PMH:HarvestEmailReport system preference" );
+        say_success( $out, "Added new system preference 'OAI-PMH:HarvestEmailReport'" );
 
         $dbh->do(
             q{
-- 
2.39.5