Bug 36819: (follow-up) Updatedatabase to correct wrong value

This patch adds an update to correct the value of scale_width to
0.800000 IF it is 0.080000. It should not change the value if it
is anything else than 0.080000.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Caroline Cyr La Rose 2024-05-21 09:37:38 -04:00 committed by Katrin Fischer
parent c4cabd5fa0
commit 83095ebc4e
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
return {
bug_number => "36819",
description => "Change barcode width value if it still has the wrong default value",
up => sub {
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%";
},
};