From 37987c27088f40b4387dc479589f459ed75d691f Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Date: Tue, 21 May 2024 16:17:36 +0100
Subject: [PATCH] Bug 36819: (QA follow-up) Improve update output

---
 installer/data/mysql/atomicupdate/bug_36819.pl | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/installer/data/mysql/atomicupdate/bug_36819.pl b/installer/data/mysql/atomicupdate/bug_36819.pl
index f002bf6c7bb..00856dcee14 100755
--- a/installer/data/mysql/atomicupdate/bug_36819.pl
+++ b/installer/data/mysql/atomicupdate/bug_36819.pl
@@ -8,9 +8,14 @@ return {
         my ($args) = @_;
         my ( $dbh, $out ) = @$args{qw(dbh out)};
 
-        $dbh->do(q{UPDATE creator_layouts SET scale_width = '0.800000' WHERE scale_width = '0.080000';});
-
-        say $out "Changed the barcode width in patron card creator default layout to 80% if it was 8%";
+        my $affected = $dbh->do(q{UPDATE creator_layouts SET scale_width = '0.800000' WHERE scale_width = '0.080000';});
 
+        if ($affected) {
+            say_warning(
+                $out, "Changed the barcode width in patron card creator default layout from 8% to 80%";
+            );
+        } else {
+            say_info( $out, "No patron card creator layouts found with 8% width, no changes required" );
+        }
     },
 };
-- 
2.45.1