From 73b0542354a415bfa4c250194f78c145c1088661 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 4 Jun 2018 15:21:06 +0000 Subject: [PATCH] Bug 3849: DBRev 18.06.00.001 Signed-off-by: Nick Clemens --- Koha.pm | 2 +- .../bug_20793_reword_acq_permissions.sql | 11 ----------- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 12 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_20793_reword_acq_permissions.sql diff --git a/Koha.pm b/Koha.pm index 37b9ef1fc8..3ff1087a7d 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 = "18.06.00.000"; +$VERSION = "18.06.00.001"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_20793_reword_acq_permissions.sql b/installer/data/mysql/atomicupdate/bug_20793_reword_acq_permissions.sql deleted file mode 100644 index 384f8605da..0000000000 --- a/installer/data/mysql/atomicupdate/bug_20793_reword_acq_permissions.sql +++ /dev/null @@ -1,11 +0,0 @@ -UPDATE permissions SET description = 'Manage budgets' WHERE code = 'period_manage'; -UPDATE permissions SET description = 'Manage funds' WHERE code = 'budget_manage'; -UPDATE permissions SET description = 'Modify funds (can''t create lines, but can modify existing ones)' WHERE code = 'budget_modify'; -UPDATE permissions SET description = 'Manage baskets and order lines' WHERE code = 'order_manage'; -UPDATE permissions SET description = 'Manage all baskets and order lines, regardless of restrictions on them' WHERE code = 'order_manage_all'; -UPDATE permissions SET description = 'Manage basket groups' WHERE code = 'group_manage'; -UPDATE permissions SET description = 'Receive orders and manage shipments' WHERE code = 'order_receive'; -UPDATE permissions SET description = 'Add and delete funds (but can''t modify funds)' WHERE code = 'budget_add_del'; -UPDATE permissions SET description = 'Manage all funds' WHERE code = 'budget_manage_all'; - -/* Bug 3849: Rephrase acquisition permissions to be more clear */ diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 0c1f41fb52..c616f8af4d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16057,6 +16057,21 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Koha 18.06 - It's Adventure time!)\n"; } +$DBversion = '18.06.00.001'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{UPDATE permissions SET description = 'Manage budgets' WHERE code = 'period_manage';}); + $dbh->do(q{UPDATE permissions SET description = 'Manage funds' WHERE code = 'budget_manage';}); + $dbh->do(q{UPDATE permissions SET description = 'Modify funds (can''t create lines, but can modify existing ones)' WHERE code = 'budget_modify';}); + $dbh->do(q{UPDATE permissions SET description = 'Manage baskets and order lines' WHERE code = 'order_manage';}); + $dbh->do(q{UPDATE permissions SET description = 'Manage all baskets and order lines, regardless of restrictions on them' WHERE code = 'order_manage_all';}); + $dbh->do(q{UPDATE permissions SET description = 'Manage basket groups' WHERE code = 'group_manage';}); + $dbh->do(q{UPDATE permissions SET description = 'Receive orders and manage shipments' WHERE code = 'order_receive';}); + $dbh->do(q{UPDATE permissions SET description = 'Add and delete funds (but can''t modify funds)' WHERE code = 'budget_add_del';}); + $dbh->do(q{UPDATE permissions SET description = 'Manage all funds' WHERE code = 'budget_manage_all';}); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 3849- Improve descriptions of granular acquisition permissions)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.2