Koha/installer/data/mysql/db_revs/240600011.pl
Katrin Fischer 0cb91c3a77
Bug 37216: DBRev 24.06.00.011
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-01 18:55:46 +02:00

23 lines
810 B
Perl
Executable file

use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
return {
bug_number => "37216",
description => "Ensure EmailFieldSelection options are correct",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
# Fix options field on EmailFieldSelection
$dbh->do(
q{ UPDATE systempreferences SET options = 'email|emailpro|B_email' WHERE variable = 'EmailFieldSelection' }
);
# Clear invalid value from EmailFieldSelection
$dbh->do(
q{ UPDATE systempreferences SET value = '' WHERE variable = 'EmailFieldSelection' AND value='email|emailpro|B_email' }
);
say_success( $out, "Updated system preference 'EmailFieldSelection'" );
},
};