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 10410-10426 foreach my $file ( sort readdir $dirh ) { Link Here
10410
    }
10410
    }
10411
}
10411
}
10412
10412
10413
10414
$DBversion = "3.19.00.XXX";
10415
if ( CheckVersion($DBversion) ) {
10416
    $dbh->do(q|
10417
        DELETE FROM userflags WHERE bit=7;
10418
    |);
10419
    print "Upgrade to $DBversion done (Bug 7976 - Remove the 'borrow' permission)\n";
10420
    SetVersion($DBversion);
10421
}
10422
10423
10424
=head1 FUNCTIONS
10413
=head1 FUNCTIONS
10425
10414
10426
=head2 TableExists($table)
10415
=head2 TableExists($table)
10427
- 

Return to bug 7976