From 442d21ac43e87dc1fadb81f84a97e921024c527b Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 13 Mar 2023 12:17:32 +0000 Subject: [PATCH] Bug 30624: Make DB update idempotent --- installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl b/installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl index c4b1d5c845..db13f6c7c8 100755 --- a/installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl +++ b/installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl @@ -13,7 +13,7 @@ return { my $IndependentBranches = C4::Context->preference('IndependentBranches'); unless ( $IndependentBranches ) { $dbh->do(q{ - UPDATE borrowers SET flags = flags + (1<<29) WHERE flags & 4; + UPDATE borrowers SET flags = flags + (1<<29) WHERE ( flags & 4 AND !(flags & 1<<29) ) ; }); } }, -- 2.30.2