MySQL Reflection: Support for inter-database Foreign Keys
I haven't worked with MSSQL yet, but I guess this ticket somehow relates to
#1341 and #594:
In MySQL you can have Foreign Keys referencing tables of a different database on the same database server. When using reflection, those inter-database FK constraints are being ignored, as they do not match the appropriate constraint regular expression.
I might not grasp every aspect of such inter-database constraints in SA yet, but a change to this regular expression seems to suffice in order for relations to be set up correctly between mapped objects of different databases without specifying primaryjoin arguments or overloading column definitions (to include self-made ForeignKey constraints) on reflected tables.
I have attached a diff to databases/mysql.py.
Best Regards, Thomas Wiebe