Bug 13766: DBRev 17.06.00.011
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 9 Oct 2017 17:24:31 +0000 (14:24 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 9 Oct 2017 19:11:16 +0000 (16:11 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha.pm
installer/data/mysql/atomicupdate/bug_13766_fix_ean.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index c8a5290..272e194 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.06.00.010";
+$VERSION = "17.06.00.011";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_13766_fix_ean.perl b/installer/data/mysql/atomicupdate/bug_13766_fix_ean.perl
deleted file mode 100644 (file)
index 21d1fc1..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-$DBversion = "XXX";
-if(CheckVersion($DBversion)) {
-    # Drop index that might exist because of bug 5337
-    if( index_exists('biblioitems', 'ean')) {
-        $dbh->do(q{ ALTER TABLE biblioitems DROP INDEX ean });
-    }
-    if( index_exists('deletedbiblioitems', 'ean')) {
-        $dbh->do(q{ ALTER TABLE deletedbiblioitems DROP INDEX ean });
-    }
-
-    # Change data type of column
-    $dbh->do(q{ ALTER TABLE biblioitems MODIFY COLUMN ean MEDIUMTEXT default NULL });
-    $dbh->do(q{ ALTER TABLE deletedbiblioitems MODIFY COLUMN ean MEDIUMTEXT default NULL });
-
-    # Add indexes
-    $dbh->do(q{ ALTER TABLE biblioitems ADD INDEX ean ( ean(255) )});
-    $dbh->do(q{ ALTER TABLE deletedbiblioitems ADD INDEX ean ( ean(255 ) )});
-
-    print "Upgrade to $DBversion done (Bug 13766 - Make ean mediumtext and add ean indexes)\n";
-    SetVersion($DBversion);
-}
index ea42dab..17eb074 100755 (executable)
@@ -14686,6 +14686,28 @@ if ( CheckVersion($DBversion) ) {
     print "Upgrade to $DBversion done (Bug 13912 - System preference for default place of publication (country code) for field 008, range 15-17)\n";
 }
 
+$DBversion = '17.06.00.011';
+if ( CheckVersion($DBversion) ) {
+    # Drop index that might exist because of bug 5337
+    if( index_exists('biblioitems', 'ean')) {
+        $dbh->do(q{ ALTER TABLE biblioitems DROP INDEX ean });
+    }
+    if( index_exists('deletedbiblioitems', 'ean')) {
+        $dbh->do(q{ ALTER TABLE deletedbiblioitems DROP INDEX ean });
+    }
+
+    # Change data type of column
+    $dbh->do(q{ ALTER TABLE biblioitems MODIFY COLUMN ean MEDIUMTEXT default NULL });
+    $dbh->do(q{ ALTER TABLE deletedbiblioitems MODIFY COLUMN ean MEDIUMTEXT default NULL });
+
+    # Add indexes
+    $dbh->do(q{ ALTER TABLE biblioitems ADD INDEX ean ( ean(255) )});
+    $dbh->do(q{ ALTER TABLE deletedbiblioitems ADD INDEX ean ( ean(255 ) )});
+
+    SetVersion($DBversion);
+    print "Upgrade to $DBversion done (Bug 13766 - Make ean mediumtext and add ean indexes)\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.