summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES5
-rw-r--r--lib/sqlalchemy/databases/mysql.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 4250bfffe..5e0bc71e5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -147,6 +147,11 @@ CHANGES
ForeignKey constructed from __clause_element__() style
construct (i.e. declarative columns). [ticket:1353]
+- mysql
+ - Reflecting a FOREIGN KEY construct will take into account
+ a dotted schema.tablename combination, if the foreign key
+ references a table in a remote schema. [ticket:1405]
+
- mssql
- Modified how savepoint logic works to prevent it from
stepping on non-savepoint oriented routines. Savepoint
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index c2b233a6e..ba6b026ea 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -2471,7 +2471,7 @@ class MySQLSchemaReflector(object):
r'%(iq)s(?P<name>(?:%(esc_fq)s|[^%(fq)s])+)%(fq)s +'
r'FOREIGN KEY +'
r'\((?P<local>[^\)]+?)\) REFERENCES +'
- r'(?P<table>%(iq)s[^%(fq)s]+%(fq)s) +'
+ r'(?P<table>%(iq)s[^%(fq)s]+%(fq)s(?:\.%(iq)s[^%(fq)s]+%(fq)s)?) +'
r'\((?P<foreign>[^\)]+?)\)'
r'(?: +(?P<match>MATCH \w+))?'
r'(?: +ON DELETE (?P<ondelete>%(on)s))?'