Bug 8835 - DBRev 16.06.00.050
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 22 Nov 2016 13:49:59 +0000 (13:49 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 22 Nov 2016 17:45:35 +0000 (17:45 +0000)
Koha.pm
installer/data/mysql/atomicupdate/8835_dbrev.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 60ac734..c475228 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 = "16.06.00.049";
+$VERSION = "16.06.00.050";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/8835_dbrev.perl b/installer/data/mysql/atomicupdate/8835_dbrev.perl
deleted file mode 100644 (file)
index eee4e75..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-$DBversion = "16.06.00.XXX";
-if ( CheckVersion($DBversion) ) {
-
-    # If index issn_idx still exists, we assume that dbrev 3.15.00.049 failed,
-    # and we repeat it (partially).
-    # Note: the db rev only pertains to biblioitems and is not needed for
-    # deletedbiblioitems.
-
-    my $temp = $dbh->selectall_arrayref( "SHOW INDEXES FROM biblioitems WHERE key_name = 'issn_idx'" );
-
-    if( @$temp > 0 ) {
-        $dbh->do( "ALTER TABLE biblioitems DROP INDEX isbn" );
-        $dbh->do( "ALTER TABLE biblioitems DROP INDEX issn" );
-        $dbh->do( "ALTER TABLE biblioitems DROP INDEX issn_idx" );
-        $dbh->do( "ALTER TABLE biblioitems CHANGE isbn isbn MEDIUMTEXT NULL DEFAULT NULL, CHANGE issn issn MEDIUMTEXT NULL DEFAULT NULL" );
-        $dbh->do( "ALTER TABLE biblioitems ADD INDEX isbn ( isbn ( 255 ) ), ADD INDEX issn ( issn ( 255 ) )" );
-        print "Upgrade to $DBversion done (Bug 8835). Removed issn_idx.\n";
-    } else {
-        print "Upgrade to $DBversion done (Bug 8835). Everything is fine.\n";
-    }
-
-    SetVersion($DBversion);
-}
index fbb9a51..e07693a 100755 (executable)
@@ -13663,6 +13663,30 @@ if( CheckVersion( $DBversion ) ) {
     print "Upgrade to $DBversion done (Bug 17391 - ReturnpathDefault and ReplyToDefault missing from syspref.sql)\n";
 }
 
+$DBversion = "16.06.00.050";
+if ( CheckVersion($DBversion) ) {
+
+    # If index issn_idx still exists, we assume that dbrev 3.15.00.049 failed,
+    # and we repeat it (partially).
+    # Note: the db rev only pertains to biblioitems and is not needed for
+    # deletedbiblioitems.
+
+    my $temp = $dbh->selectall_arrayref( "SHOW INDEXES FROM biblioitems WHERE key_name = 'issn_idx'" );
+
+    if( @$temp > 0 ) {
+        $dbh->do( "ALTER TABLE biblioitems DROP INDEX isbn" );
+        $dbh->do( "ALTER TABLE biblioitems DROP INDEX issn" );
+        $dbh->do( "ALTER TABLE biblioitems DROP INDEX issn_idx" );
+        $dbh->do( "ALTER TABLE biblioitems CHANGE isbn isbn MEDIUMTEXT NULL DEFAULT NULL, CHANGE issn issn MEDIUMTEXT NULL DEFAULT NULL" );
+        $dbh->do( "ALTER TABLE biblioitems ADD INDEX isbn ( isbn ( 255 ) ), ADD INDEX issn ( issn ( 255 ) )" );
+        print "Upgrade to $DBversion done (Bug 8835). Removed issn_idx.\n";
+    } else {
+        print "Upgrade to $DBversion done (Bug 8835). Everything is fine.\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.