From c66e7475f8bb55b4adf9ffc8a474dc80a9d45b4d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 31 Dec 2015 13:14:57 +0000 Subject: [PATCH] Bug 9303 - DBrev 3.23.00.008 Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_9303.sql | 12 ---------- installer/data/mysql/updatedatabase.pl | 22 +++++++++++++++++++ 3 files changed, 23 insertions(+), 13 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_9303.sql diff --git a/Koha.pm b/Koha.pm index 85a21fcf88..c821a5a056 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 = "3.23.00.007"; +$VERSION = "3.23.00.008"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_9303.sql b/installer/data/mysql/atomicupdate/bug_9303.sql deleted file mode 100644 index abaafacd5e..0000000000 --- a/installer/data/mysql/atomicupdate/bug_9303.sql +++ /dev/null @@ -1,12 +0,0 @@ -ALTER TABLE borrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy; - -ALTER TABLE deletedborrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy; - -INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) -VALUES ( - 'AllowStaffToSetCheckoutsVisibilityForGuarantor', '0', NULL, - 'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo' -), ( - 'AllowPatronToSetCheckoutsVisibilityForGuarantor', '0', NULL, - 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo' -); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 39a8542867..8210bd7c1a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -11556,6 +11556,28 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.23.00.008"; +if ( CheckVersion($DBversion) ) { + + $dbh->do(q{ALTER TABLE borrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy}); + + $dbh->do(q{ALTER TABLE deletedborrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy}); + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) + VALUES ( + 'AllowStaffToSetCheckoutsVisibilityForGuarantor', '0', NULL, + 'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo' + ), ( + 'AllowPatronToSetCheckoutsVisibilityForGuarantor', '0', NULL, + 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo' + ) + }); + + print "Upgrade to $DBversion done (Bug 9303 - relative's checkouts in the opac)\n"; + SetVersion($DBversion); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.20.1