Bug 20691: DBRev 19.06.00.026

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2019-09-11 08:57:42 +01:00
parent 81b2e7f4cb
commit 16399fd236
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
3 changed files with 33 additions and 33 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 = "19.06.00.025";
$VERSION = "19.06.00.026";
sub version {
return $VERSION;

View File

@ -1,32 +0,0 @@
$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";
}

View File

@ -19386,6 +19386,38 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 22996 - Add pref BarcodeSeparators)\n";
}
$DBversion = '19.06.00.026';
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'
)
});
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 20691 - Add ability for guarantors to view guarantee's fines in OPAC)\n";
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';