From 340c18d8bc2c2b0691c0c45de201d4b663d90a47 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 9 Feb 2018 15:38:54 -0300 Subject: [PATCH] Bug 18403: DBRev 17.12.00.009 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../atomicupdate/bug_xxxxx-add-permission.perl | 13 ------------- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_xxxxx-add-permission.perl diff --git a/Koha.pm b/Koha.pm index 5aa10ab2ce..0f0c91b600 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 = "17.12.00.008"; +$VERSION = "17.12.00.009"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_xxxxx-add-permission.perl b/installer/data/mysql/atomicupdate/bug_xxxxx-add-permission.perl deleted file mode 100644 index 0918c27111..0000000000 --- a/installer/data/mysql/atomicupdate/bug_xxxxx-add-permission.perl +++ /dev/null @@ -1,13 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - $dbh->do(q| - INSERT IGNORE INTO permissions (module_bit, code, description) VALUES - (4, 'edit_borrowers', 'Add, modify and view patron information'), - (4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'); - |); - - # We are lucky here, there is nothing else to do: flags 4-borrowers did not contain sub permissions - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug XXXXX - Add the view_borrower_infos_from_any_libraries permission )\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8c30ed8c33..d1cf34c480 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15295,6 +15295,20 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = '17.12.00.009'; +if ( CheckVersion($DBversion) ) { + $dbh->do(q| + INSERT IGNORE INTO permissions (module_bit, code, description) VALUES + (4, 'edit_borrowers', 'Add, modify and view patron information'), + (4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'); + |); + + # We are lucky here, there is nothing else to do: flags 4-borrowers did not contain sub permissions + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 18403 - Add the view_borrower_infos_from_any_libraries permission )\n"; +} + # 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.39.2