From: Mike Bayer Date: Tue, 18 Jul 2006 00:13:23 +0000 (+0000) Subject: fixed table name in REFERENCES clause to include schema if applicable X-Git-Tag: rel_0_2_6~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=99dca5043c10f3a01e2220a763f256cb28dc96aa;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fixed table name in REFERENCES clause to include schema if applicable --- diff --git a/lib/sqlalchemy/ansisql.py b/lib/sqlalchemy/ansisql.py index 5d01e275cb..02423560ba 100644 --- a/lib/sqlalchemy/ansisql.py +++ b/lib/sqlalchemy/ansisql.py @@ -660,7 +660,7 @@ class ANSISchemaGenerator(engine.SchemaIterator): self.append("CONSTRAINT %s " % constraint.name) self.append("FOREIGN KEY(%s) REFERENCES %s (%s)" % ( string.join([f.parent.name for f in constraint.elements], ', '), - list(constraint.elements)[0].column.table.name, + list(constraint.elements)[0].column.table.fullname, string.join([f.column.name for f in constraint.elements], ', ') )) if constraint.ondelete is not None: