From 488ceca3d1b7b0f858993b4ee9a7dbb939d8bdb6 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 20 Aug 2021 14:09:13 -0400 Subject: [PATCH] Bug 28872: DBRev 21.05.02.003 Signed-off-by: Kyle M Hall --- .../atomicupdate/bug_28872_update_log_values.pl | 12 ------------ installer/data/mysql/updatedatabase.pl | 8 ++++++++ 2 files changed, 8 insertions(+), 12 deletions(-) delete mode 100755 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 deleted file mode 100755 index 770c5ce7ca..0000000000 --- a/installer/data/mysql/atomicupdate/bug_28872_update_log_values.pl +++ /dev/null @@ -1,12 +0,0 @@ -use Modern::Perl; - -return { - bug_number => "28872", - description => "Update syspref values from on and off to 1 and 0", - up => sub { - my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; - $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'}); - }, -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4042fbbe8c..5ed58f321d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24414,6 +24414,14 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 28813, "Update delivery_note to failure_code in message_queue"); } +$DBversion = '21.05.02.003'; +if( CheckVersion( $DBversion ) ) { + $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'}); + + NewVersion( $DBversion, 28872, "Update syspref values from on and off to 1 and 0"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5