Koha/installer/data/mysql/db_revs/210600011.pl
Jonathan Druart 8b0a44dcb5 Bug 25078: Explicitely return from DB revs to avoid warnings
% perl -wc installer/data/mysql/atomicupdate/skeleton.pl
Useless use of anonymous hash ({}) in void context at installer/data/mysql/atomicupdate/skeleton.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-18 12:59:35 +02:00

39 lines
831 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "28567",
description => "Set to NULL empty branches fields",
up => sub {
my ($args) = @_;
my $dbh = $args->{dbh};
my @fields = qw(
branchname
branchaddress1
branchaddress2
branchaddress3
branchzip
branchcity
branchstate
branchcountry
branchphone
branchfax
branchemail
branchillemail
branchreplyto
branchreturnpath
branchurl
branchip
branchnotes
opac_info
marcorgcode
);
for my $f ( @fields ) {
$dbh->do(qq{
UPDATE branches
SET $f = NULL
WHERE $f = ""
});
}
},
}