Fixed bug in foreign key autogenerate where if the in-Python table
used custom column keys (e.g. using the key='foo' kwarg to Column), the comparison of existing foreign keys to those specified
in the metadata would fail, as the reflected table would not have
these keys available which to match up. Foreign key comparison for
autogenerate now ensures it's looking at the database-side names
of the columns in all cases; this matches the same functionality
within unique constraints and indexes.
fixes autogenerate FK comparison (and uniques, indexes?) comparing on column.key, but reflection doesn't have this #260
Migrated issue, originally created by Michael Bayer (@zzzeek)
given local metadata:
the DDL for this is:
autogenerate here fails because ddl.base._fk_spec is using column.key for the source columns:
uq and ix seem to be using column.name and might be OK but tests should be added.
The text was updated successfully, but these errors were encountered: