From 8070357a4070cbcfb6f854fa421b48482b1c0ab4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 12 Feb 2018 17:50:33 -0300 Subject: [PATCH] Bug 15752: DBRev 17.12.00.012 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../atomicupdate/Bug15752_CircAutoSwitchPatron.sql | 2 -- installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql diff --git a/Koha.pm b/Koha.pm index cecdeb8ea8..5aa7d80778 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.011"; +$VERSION = "17.12.00.012"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql b/installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql deleted file mode 100644 index 620c65992b..0000000000 --- a/installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO systempreferences (variable,value,options,explanation,type) -VALUES ('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bae69380b3..b36d0d5037 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15324,6 +15324,18 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 20157 - Use group 'features' to decide which groups to use for group searching functionality)\n"; } +$DBversion = '17.12.00.012'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do( q| + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) + VALUES ('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo'); + |); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 15752 - Add system preference AutoSwitchPatron)\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.5