Bug 32191: Tidy upgrade scripts output
[srvgit] / installer / data / mysql / db_revs / 220600068.pl
1 use Modern::Perl;
2
3 return {
4     bug_number => "30588",
5     description => "Add an 'enforce' option for 'TwoFactorAuthentication' system preference",
6     up => sub {
7         my ($args) = @_;
8         my ($dbh, $out) = @$args{qw(dbh out)};
9         $dbh->do(q{
10             UPDATE systempreferences
11             SET options="enforced|enabled|disabled",
12                 value=CASE value WHEN '1' THEN 'enabled' ELSE 'disabled' END,
13                 type="Choice"
14             WHERE variable="TwoFactorAuthentication"
15         });
16
17         say $out "Updated system preference 'TwoFactorAuthentication'";
18     },
19 };