Bug 7976: DBRev 3.21.00.006

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Tomas Cohen Arazi 2015-06-05 13:50:14 -03:00
parent 5cb9913ee3
commit 25caeacaed
3 changed files with 17 additions and 23 deletions

View File

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "3.21.00.005";
$VERSION = "3.21.00.006";
sub version {
return $VERSION;

View File

@ -1,22 +0,0 @@
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);
-- }

View File

@ -10538,6 +10538,22 @@ if ( CheckVersion($DBversion) ) {
SetVersion ($DBversion);
}
$DBversion = "3.21.00.006";
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);
}
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.