MySQL: Ignore unique indexes when removing implicit indexes
Johannes Erdfelt
Branch: Deleted repository:mysql-unique-index-removed
Branch: zzzeek/alembic:master
Merged
Merged pull request
Merge branch 'mysql-unique-index-removed' of https://bitbucket.org/jerdfelt/alembic into pr35
MySQL will implicitly create indexes when using foreign keys. Alembic attempts to remove those implicit indexes so they don't appear as removes when comparing metadata.
However, unique indexes with the same name as a column are considered as possibly implicitly created causing alembic to emit a spurious 'remove_constraint'.
Since MySQL will never implicitly create unique indexes, they can be safely ignored when removing the implicit indexes.
Fixes #251