Bug 15752: DBRev 17.12.00.012
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Feb 2018 20:50:33 +0000 (17:50 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Feb 2018 21:01:59 +0000 (18:01 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha.pm
installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index cecdeb8..5aa7d80 100644 (file)
--- 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 (file)
index 620c659..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-INSERT INTO systempreferences (variable,value,options,explanation,type)
-VALUES ('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo');
index bae6938..b36d0d5 100755 (executable)
@@ -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.