Bug 18066: Update DB rev (3.22.20.001)
authorBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 23 Mar 2017 00:18:10 +0000 (00:18 +0000)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 10 May 2017 14:16:27 +0000 (16:16 +0200)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Koha.pm
installer/data/mysql/atomicupdate/bug_18066.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index bf60871..fe6f3f1 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 = "3.22.20.000";
+$VERSION = "3.22.20.001";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_18066.perl b/installer/data/mysql/atomicupdate/bug_18066.perl
deleted file mode 100644 (file)
index 4ad2fc8..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-$DBversion = 'XXX';
-if( CheckVersion( $DBversion ) ) {
-    unless( column_exists( 'branches', 'geolocation' ) ) {
-        $dbh->do(q|
-            ALTER TABLE branches ADD COLUMN geolocation VARCHAR(255) DEFAULT NULL after opac_info
-        |);
-    }
-
-    $dbh->do(q|
-        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ('UsageStatsGeolocation', '', NULL, 'Geolocation of the main library', 'Free');
-    |);
-    $dbh->do(q|
-        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ('UsageStatsLibrariesInfo', '', NULL, 'Share libraries information', 'YesNo');
-    |);
-    $dbh->do(q|
-        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ('UsageStatsPublicID', '', NULL, 'Public ID for Hea website', 'Free');
-    |);
-
-    SetVersion( $DBversion );
-    print "Upgrade to $DBversion done (Bug 18066 - Hea version 2)\n";
-}
index ab882e6..67127ec 100755 (executable)
@@ -12005,6 +12005,38 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.22.20.001";
+if ( CheckVersion($DBversion) ) {
+    unless( column_exists( 'branches', 'geolocation' ) ) {
+        $dbh->do(q|
+            ALTER TABLE branches
+            ADD COLUMN geolocation VARCHAR(255) DEFAULT NULL after opac_info
+        |);
+    }
+
+    $dbh->do(q|
+        INSERT IGNORE INTO systempreferences
+            (variable, value, options, explanation, type)
+        VALUES
+            ('UsageStatsGeolocation', '', NULL, 'Geolocation of the main library', 'Free')
+    |);
+    $dbh->do(q|
+        INSERT IGNORE INTO systempreferences
+            (variable, value, options, explanation, type)
+        VALUES
+            ('UsageStatsLibrariesInfo', '', NULL, 'Share libraries information', 'YesNo')
+    |);
+    $dbh->do(q|
+        INSERT IGNORE INTO systempreferences
+            (variable, value, options, explanation, type)
+        VALUES
+            ('UsageStatsPublicID', '', NULL, 'Public ID for Hea website', 'Free')
+    |);
+
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 18066 - Hea version 2)\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.