From 31c3455f8a0d557a6366a27462f9d6f20cabc975 Mon Sep 17 00:00:00 2001 From: Andrew Fuerste-Henry Date: Tue, 17 Aug 2021 23:57:54 +0000 Subject: [PATCH] Bug 28872: Atomicupdate to correct existing values Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../atomicupdate/bug_28872_update_log_values.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_28872_update_log_values.pl diff --git a/installer/data/mysql/atomicupdate/bug_28872_update_log_values.pl b/installer/data/mysql/atomicupdate/bug_28872_update_log_values.pl new file mode 100644 index 0000000000..4ee8b75e3e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_28872_update_log_values.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +{ + bug_number => "28872", + description => "update values from on and off to 1 and 0", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Do you stuffs here + $dbh->do(q{update systempreferences set value=1 where variable in ('AcquisitionLog', 'NewsLog', 'NoticesLog') and value='on'}); + $dbh->do(q{update systempreferences set value=0 where variable in ('AcquisitionLog', 'NewsLog', 'NoticesLog') and value='off'}); + + # Print useful stuff here + say $out "Update is going well so far"; + }, +} -- 2.39.5