Add IF EXISTS to DROP INDEX (except under MySQL)
[DBIx-DBSchema.git] / DBSchema / Table.pm
index aec605f..081841a 100644 (file)
@@ -631,7 +631,7 @@ sub sql_alter_table {
     warn "removing obsolete index $table.$old ON ( ".
          $old_indices{$old}->columns_sql. " )\n"
       if $DEBUG > 1;
-    push @r, "DROP INDEX '.
+    push @r, 'DROP INDEX '.
              ( $driver ne 'mysql' ? ' IF EXISTS ' : '');
              " $old ".
              ( $driver eq 'mysql' ? " ON $table " : '');