diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-30 18:02:57 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-30 18:02:57 -0500 |
commit | 96bbcf2542959b5b0dc99bbfb0db9a1db7072bc5 (patch) | |
tree | 1bef6c1a3ec78296b0d7b49491de0fdc3008a9e4 /alembic/ddl/mysql.py | |
parent | c4409d67985fca04efdad02da8d3a7b8bc7cdc6f (diff) | |
download | alembic-96bbcf2542959b5b0dc99bbfb0db9a1db7072bc5.tar.gz |
- refactor the FK merge a bit
- getting at attributes of FKs varies a bit on SQLA versions,
so implement an _fk_spec() called for all FK inspection
- to enable include_object() filters and allow the FK constraint
code to flow like that of indexes/uniques, change the approach
so that we deal with an _fk_constraint_sig() object again which
contains the real ForeignKeyConstraint() within; we need this
anyway for include_object, but also allows us to use the standard
"drop_constraint" call for rendering.
- enhance tests in test_autogen_fks to support real FK databases like
Postgresql, MySQL, add in InnoDB flags and ensure that FKs refer
to real primary key constraints for PG support
- implement and test include_object() support for FKs
- inspectors all have get_foreign_keys(), no need to check
- repair the drop_constraint call to quote the "type" and table
name correctly, run all constraint drops through drop_constraint()
for rendering
- fix up schema identifiers for foreign key autogens
Diffstat (limited to 'alembic/ddl/mysql.py')
-rw-r--r-- | alembic/ddl/mysql.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/alembic/ddl/mysql.py b/alembic/ddl/mysql.py index aac8184..b93d29f 100644 --- a/alembic/ddl/mysql.py +++ b/alembic/ddl/mysql.py @@ -95,7 +95,6 @@ class MySQLImpl(DefaultImpl): # TODO: if SQLA 1.0, make use of "duplicates_index" # metadata - removed = set() for idx in list(conn_indexes): # MySQL puts implicit indexes on FK columns, even if |