From 29df16432d4cf8ed522c1172578fc8c2f95da6f2 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 5 Jan 2009 16:08:12 +0000 Subject: assume table.schema, not None, when constraint reflection has no explicit schema. unit test TBD. --- lib/sqlalchemy/databases/mysql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/databases/mysql.py') diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 1b977dce9..045225c93 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -2306,7 +2306,7 @@ class MySQLSchemaReflector(object): for spec in constraints: # only FOREIGN KEYs ref_name = spec['table'][-1] - ref_schema = len(spec['table']) > 1 and spec['table'][-2] or None + ref_schema = len(spec['table']) > 1 and spec['table'][-2] or table.schema if not ref_schema: if default_schema is None: -- cgit v1.2.1