Bug 20691: (QA follow-up) Fix atomic update
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
27a1653632
commit
7f8375f009
2 changed files with 32 additions and 11 deletions
32
installer/data/mysql/atomicupdate/bug_20691.perl
Normal file
32
installer/data/mysql/atomicupdate/bug_20691.perl
Normal file
|
@ -0,0 +1,32 @@
|
|||
$DBversion = 'XXX';
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
|
||||
unless ( column_exists( 'borrowers', 'privacy_guarantor_fines' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE borrowers
|
||||
ADD privacy_guarantor_fines TINYINT(1) NOT NULL DEFAULT '0' AFTER privacy;
|
||||
});
|
||||
}
|
||||
|
||||
unless ( column_exists( 'deletedborrowers', 'privacy_guarantor_fines' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE deletedborrowers
|
||||
ADD privacy_guarantor_fines TINYINT(1) NOT NULL DEFAULT '0' AFTER privacy;
|
||||
});
|
||||
}
|
||||
|
||||
$dbh->do(q{
|
||||
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type )
|
||||
VALUES (
|
||||
'AllowStaffToSetFinesVisibilityForGuarantor', '0', NULL,
|
||||
'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.', 'YesNo'
|
||||
), (
|
||||
'AllowPatronToSetFinesVisibilityForGuarantor', '0', NULL,
|
||||
'If enabled, the patron can set fines to be visible to his or her guarantor', 'YesNo'
|
||||
)
|
||||
});
|
||||
|
||||
# Always end with this (adjust the bug info)
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 20691 - Add ability for guarantors to view guarantee's fines in OPAC)\n";
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
ALTER TABLE borrowers ADD privacy_guarantor_fines BOOLEAN NOT NULL DEFAULT '0' AFTER privacy;
|
||||
ALTER TABLE deletedborrowers ADD privacy_guarantor_fines BOOLEAN NOT NULL DEFAULT '0' AFTER privacy;
|
||||
|
||||
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type )
|
||||
VALUES (
|
||||
'AllowStaffToSetFinesVisibilityForGuarantor', '0', NULL,
|
||||
'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.', 'YesNo'
|
||||
), (
|
||||
'AllowPatronToSetFinesVisibilityForGuarantor', '0', NULL,
|
||||
'If enabled, the patron can set fines to be visible to his or her guarantor', 'YesNo'
|
||||
)
|
Loading…
Reference in a new issue