Bug 8835: Drop issn_idx for completeness
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 12 Oct 2016 13:29:01 +0000 (15:29 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 22 Nov 2016 17:45:21 +0000 (17:45 +0000)
When dbrev 3.15.00.049 failed, the still existing issn_idx must have
been the cause.
This patch only adjusts the old db rev.
Still thinking if we also need a new db rev to fix isbn and issn for
those installs where 3.15.00.049 failed too. (In that case the fields
may not have been changed to mediumtext and no indexes were added.)

Test plan:
Ideally, run an upgrade from something older than 3.15.00.49.
But running the added sql command from the command line might convince
you too.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
installer/data/mysql/updatedatabase.pl

index 5aa770b..fbb9a51 100755 (executable)
@@ -8476,6 +8476,7 @@ $DBversion = "3.15.00.049";
 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     $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