From 16399fd2363ff4bacd2ab4ffe042d211a10e071d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 11 Sep 2019 08:57:42 +0100 Subject: [PATCH] Bug 20691: DBRev 19.06.00.026 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_20691.perl | 32 ------------------- installer/data/mysql/updatedatabase.pl | 32 +++++++++++++++++++ 3 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_20691.perl diff --git a/Koha.pm b/Koha.pm index 0402845f34..49bdef341d 100644 --- a/Koha.pm +++ b/Koha.pm @@ -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; diff --git a/installer/data/mysql/atomicupdate/bug_20691.perl b/installer/data/mysql/atomicupdate/bug_20691.perl deleted file mode 100644 index 41bc517159..0000000000 --- a/installer/data/mysql/atomicupdate/bug_20691.perl +++ /dev/null @@ -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"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index d9fb840f7d..e64661a253 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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/'; -- 2.39.5