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

(-)a/installer/data/mysql/atomicupdate/bug_20691.perl (+32 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
4
    unless ( column_exists( 'borrowers', 'privacy_guarantor_fines' ) ) {
5
        $dbh->do(q{
6
            ALTER TABLE borrowers
7
                ADD privacy_guarantor_fines TINYINT(1) NOT NULL DEFAULT '0' AFTER privacy;
8
        });
9
    }
10
11
    unless ( column_exists( 'deletedborrowers', 'privacy_guarantor_fines' ) ) {
12
        $dbh->do(q{
13
            ALTER TABLE deletedborrowers
14
                ADD privacy_guarantor_fines TINYINT(1) NOT NULL DEFAULT '0' AFTER privacy;
15
        });
16
    }
17
18
    $dbh->do(q{
19
        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type )
20
        VALUES (
21
            'AllowStaffToSetFinesVisibilityForGuarantor',  '0', NULL,
22
            'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.',  'YesNo'
23
        ), (
24
            'AllowPatronToSetFinesVisibilityForGuarantor',  '0', NULL,
25
            'If enabled, the patron can set fines to be visible to  his or her guarantor',  'YesNo'
26
        )
27
    });
28
29
    # Always end with this (adjust the bug info)
30
    SetVersion( $DBversion );
31
    print "Upgrade to $DBversion done (Bug 20691 - Add ability for guarantors to view guarantee's fines in OPAC)\n";
32
}
(-)a/installer/data/mysql/atomicupdate/bug_20691.sql (-12 lines)
Lines 1-11 Link Here
1
ALTER TABLE borrowers ADD privacy_guarantor_fines BOOLEAN NOT NULL DEFAULT '0' AFTER privacy;
2
ALTER TABLE deletedborrowers ADD privacy_guarantor_fines BOOLEAN NOT NULL DEFAULT '0' AFTER privacy;
3
4
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type )
5
VALUES (
6
    'AllowStaffToSetFinesVisibilityForGuarantor',  '0', NULL,
7
    'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.',  'YesNo'
8
), (
9
    'AllowPatronToSetFinesVisibilityForGuarantor',  '0', NULL,
10
    'If enabled, the patron can set fines to be visible to  his or her guarantor',  'YesNo'
11
)
12
- 

Return to bug 20691