@@ -, +, @@ --- .../bug-7976-update-borrower-flags.sql | 23 ++++++++++++++++++++ installer/data/mysql/updatedatabase.pl | 11 ---------- 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql --- a/installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql +++ a/installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql @@ -0,0 +1,23 @@ +UPDATE borrowers +SET flags = flags - ( flags & (1<<7) ) +WHERE flags IS NOT NULL + AND flags > 0; + +DELETE FROM userflags WHERE bit=7; + +--$DBversion = "3.19.00.XXX"; +--if ( CheckVersion($DBversion) ) { +-- # Remove the borrow permission flag (bit 7) +-- $dbh->do(q| +-- UPDATE borrowers +-- SET flags = flags - ( flags & (1<<7) ) +-- WHERE flags IS NOT NULL +-- AND flags > 0 +-- |); +-- $dbh->do(q| +-- DELETE FROM userflags WHERE bit=7; +-- |); +-- print "Upgrade to $DBversion done (Bug 7976 - Remove the 'borrow' permission)\n"; +-- SetVersion($DBversion); +--} + --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -10408,17 +10408,6 @@ foreach my $file ( sort readdir $dirh ) { } } - -$DBversion = "3.19.00.XXX"; -if ( CheckVersion($DBversion) ) { - $dbh->do(q| - DELETE FROM userflags WHERE bit=7; - |); - print "Upgrade to $DBversion done (Bug 7976 - Remove the 'borrow' permission)\n"; - SetVersion($DBversion); -} - - =head1 FUNCTIONS =head2 TableExists($table) --