From 25caeacaed3aff67dad4df694b92dfe2b0546034 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 5 Jun 2015 13:50:14 -0300 Subject: [PATCH] Bug 7976: DBRev 3.21.00.006 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- .../bug-7976-update-borrower-flags.sql | 22 ------------------- installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++ 3 files changed, 17 insertions(+), 23 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql diff --git a/Koha.pm b/Koha.pm index aa5554e969..55730eb87b 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.21.00.005"; +$VERSION = "3.21.00.006"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql b/installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql deleted file mode 100644 index 8ea6ceda64..0000000000 --- a/installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql +++ /dev/null @@ -1,22 +0,0 @@ -UPDATE borrowers -SET flags = flags - ( flags & (1<<7) ) -WHERE flags IS NOT NULL - AND flags > 0; - -DELETE FROM userflags WHERE bit=7; - --- $DBversion = "3.19.00.XXX"; --- if ( CheckVersion($DBversion) ) { --- # Remove the borrow permission flag (bit 7) --- $dbh->do(q| --- UPDATE borrowers --- SET flags = flags - ( flags & (1<<7) ) --- WHERE flags IS NOT NULL --- AND flags > 0 --- |); --- $dbh->do(q| --- DELETE FROM userflags WHERE bit=7; --- |); --- print "Upgrade to $DBversion done (Bug 7976 - Remove the 'borrow' permission)\n"; --- SetVersion($DBversion); --- } diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e0989b51b6..34c2d741fa 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10538,6 +10538,22 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.21.00.006"; +if ( CheckVersion($DBversion) ) { + # Remove the borrow permission flag (bit 7) + $dbh->do(q| + UPDATE borrowers + SET flags = flags - ( flags & (1<<7) ) + WHERE flags IS NOT NULL + AND flags > 0 + |); + $dbh->do(q| + DELETE FROM userflags WHERE bit=7; + |); + print "Upgrade to $DBversion done (Bug 7976: Remove the 'borrow' permission)\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.39.5