diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-02 10:34:58 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-02 10:34:58 -0500 |
commit | b16bdf8789cc3f16fd6a5a94288ba204646bbc23 (patch) | |
tree | 4aaad36f12944318e70e63a7198a2ded7c66efb0 /alembic/ddl/mysql.py | |
parent | 9650ccfb6841de45efdedb40de5b5f9d3d2f4582 (diff) | |
download | alembic-b16bdf8789cc3f16fd6a5a94288ba204646bbc23.tar.gz |
- Repaired issue related to the fix for #208 and others; a composite
foreign key reported by MySQL would cause a KeyError as Alembic
attempted to remove MySQL's implicitly generated indexes from the
autogenerate list.
fixes #240
Diffstat (limited to 'alembic/ddl/mysql.py')
-rw-r--r-- | alembic/ddl/mysql.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/alembic/ddl/mysql.py b/alembic/ddl/mysql.py index 7545df7..07a3257 100644 --- a/alembic/ddl/mysql.py +++ b/alembic/ddl/mysql.py @@ -92,6 +92,8 @@ class MySQLImpl(DefaultImpl): conn_indexes.remove(idx) removed.add(idx.name) break + if idx.name in removed: + break # then remove indexes from the "metadata_indexes" # that we've removed from reflected, otherwise they come out |