View | Details | Raw Unified | Return to bug 7976
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql (+23 lines)
Line 0 Link Here
1
UPDATE borrowers 
2
SET flags = flags - ( flags & (1<<7) ) 
3
WHERE flags IS NOT NULL 
4
    AND flags > 0;
5
6
DELETE FROM userflags WHERE bit=7;
7
8
-- $DBversion = "3.19.00.XXX";
9
-- if ( CheckVersion($DBversion) ) {
10
--     # Remove the borrow permission flag (bit 7)
11
--     $dbh->do(q|
12
--         UPDATE borrowers
13
--         SET flags = flags - ( flags & (1<<7) )
14
--         WHERE flags IS NOT NULL
15
--             AND flags > 0
16
--     |);
17
--     $dbh->do(q|
18
--         DELETE FROM userflags WHERE bit=7;
19
--     |);
20
--     print "Upgrade to $DBversion done (Bug 7976 - Remove the 'borrow' permission)\n";
21
--     SetVersion($DBversion);
22
-- }
23
(-)a/installer/data/mysql/updatedatabase.pl (-12 lines)
Lines 10408-10424 foreach my $file ( sort readdir $dirh ) { Link Here
10408
    }
10408
    }
10409
}
10409
}
10410
10410
10411
10412
$DBversion = "3.19.00.XXX";
10413
if ( CheckVersion($DBversion) ) {
10414
    $dbh->do(q|
10415
        DELETE FROM userflags WHERE bit=7;
10416
    |);
10417
    print "Upgrade to $DBversion done (Bug 7976 - Remove the 'borrow' permission)\n";
10418
    SetVersion($DBversion);
10419
}
10420
10421
10422
=head1 FUNCTIONS
10411
=head1 FUNCTIONS
10423
10412
10424
=head2 TableExists($table)
10413
=head2 TableExists($table)
10425
- 

Return to bug 7976