summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/schema.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-07-08 21:18:46 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-07-08 21:18:46 +0000
commitaf611b101842ee9482ddd901762fd73a6fe62364 (patch)
treefba3ae06613124b86f51527b5fabd0d70fc3210f /lib/sqlalchemy/schema.py
parentb9a59f5cefe4db59867a7484d03341571b1e3a4c (diff)
downloadsqlalchemy-af611b101842ee9482ddd901762fd73a6fe62364.tar.gz
- ForeignKey to a table in a schema thats not the default schema
requires the schema to be explicit; i.e. ForeignKey('alt_schema.users.id') - the fix in "schema" above fixes postgres reflection of foreign keys from an alt-schema table to a public schema table
Diffstat (limited to 'lib/sqlalchemy/schema.py')
-rw-r--r--lib/sqlalchemy/schema.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py
index d01677b69..eb7eb8c1d 100644
--- a/lib/sqlalchemy/schema.py
+++ b/lib/sqlalchemy/schema.py
@@ -701,7 +701,7 @@ class ForeignKey(SchemaItem):
raise exceptions.ArgumentError("Invalid foreign key column specification: " + self._colspec)
if m.group(3) is None:
(tname, colname) = m.group(1, 2)
- schema = parenttable.schema
+ schema = None
else:
(schema,tname,colname) = m.group(1,2,3)
table = Table(tname, parenttable.metadata, mustexist=True, schema=schema)