sqlalchemy-diff
sqlalchemy-diff copied to clipboard
Correctly join anonymous ForeignKey constraints
Previously, this codepath would report that the 'name' of anonymous foreign keys was None. While strictly correct, this caused false reports of schema differences when comparing identical tables with multiple unnamed FK constraints as sqlalchemydiff failed to join the anonymous constraints by name. Imagine four FK constraints all understood to be named None.
An SQL implementation will understand these FKs as being keyed by the quad (from_table, from_field, to_table, to_field) and so too should sqlalchemydiff. At least as a fallback.