Commit 427d238b authored by travis%sedsystems.ca's avatar travis%sedsystems.ca

Bug 278148: checksetup.pl *still* errors when trying to drop index on milestones table

Patch by Max K-A <mkanat@kerio.com> r=travis a=justdave
parent 889d3425
......@@ -2365,9 +2365,14 @@ sub DropIndexes ($)
#
next if exists $SEEN{$$ref[2]};
my $dropSth = $dbh->prepare("ALTER TABLE $table DROP INDEX $$ref[2]");
$dropSth->execute;
$dropSth->finish;
if ($$ref[2] eq 'PRIMARY') {
# The syntax for dropping a PRIMARY KEY is different
# from the normal DROP INDEX syntax.
$dbh->do("ALTER TABLE $table DROP PRIMARY KEY");
}
else {
$dbh->do("ALTER TABLE $table DROP INDEX $$ref[2]");
}
$SEEN{$$ref[2]} = 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment