MySQL: Ignore unique indexes when removing implicit indexes

Merged
#35 · Created  · Last updated

Merged pull request

Merge branch 'mysql-unique-index-removed' of https://bitbucket.org/jerdfelt/alembic into pr35

885848e·Author: ·Closed by: ·2014-12-04

Description

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

0 attachments

0 comments

Loading commits...