Browse Source

Bug 30624: Make DB update idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23.05.x
Lucas Gass 1 year ago
committed by Tomas Cohen Arazi
parent
commit
790df84a13
Signed by: tomascohen GPG Key ID: 0A272EA1B2F3C15F
  1. 2
      installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl

2
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) ) ;
});
}
},

Loading…
Cancel
Save