summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2009-05-17 22:00:33 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2009-05-17 22:00:33 +0000
commitab0434d6488772b927c3937737784e92b660e118 (patch)
treee87539645be7bb3d6a3ce145ed87c9acb7fc08f9 /lib/sqlalchemy/databases/mysql.py
parent9cafc854796e5a095697d577b61dac704b078704 (diff)
downloadsqlalchemy-ab0434d6488772b927c3937737784e92b660e118.tar.gz
- 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]
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py2
1 files changed, 1 insertions, 1 deletions
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))?'