From 9a58672e38ba9b31e1c5663330c4f142ea765c96 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 14 Jul 2021 15:01:23 +0000 Subject: [PATCH] Bug 27944: (follow-up) Move existing statuses, rename idempotent --- installer/data/mysql/atomicupdate/bug_27944.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_27944.perl b/installer/data/mysql/atomicupdate/bug_27944.perl index bc6489fd78..1d0f2f2b0a 100644 --- a/installer/data/mysql/atomicupdate/bug_27944.perl +++ b/installer/data/mysql/atomicupdate/bug_27944.perl @@ -5,6 +5,7 @@ if ( CheckVersion($DBversion) ) { $dbh->do( "ALTER TABLE `article_requests` MODIFY `status` enum('REQUESTED', 'PENDING','PROCESSING','COMPLETED','CANCELED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'REQUESTED'" ); + $dbh->do(q|UPDATE article_requests SET status='REQUESTED' WHERE status='PENDING'|); $dbh->do( q{ @@ -14,7 +15,7 @@ if ( CheckVersion($DBversion) ) { WHERE `module` = 'circulation' AND `code` = 'AR_PENDING' } - ); + ) if ( $dbh->selectrow_array('SELECT COUNT(*) FROM letter WHERE code=?', undef, 'AR_REQUESTED') )[0] == 0; # Check to make idempotent $dbh->do( q{ -- 2.25.1