]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
on foreign key default schema is that of the parent column
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Jan 2006 01:14:52 +0000 (01:14 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Jan 2006 01:14:52 +0000 (01:14 +0000)
lib/sqlalchemy/schema.py

index efa4c02e1c0d4f48df9bd8f1319863590e412ea9..86613ade989769b29ed81b6fe86e51f21c2b7a6b 100644 (file)
@@ -376,8 +376,7 @@ class ForeignKey(SchemaItem):
                     raise ValueError("Invalid foreign key column specification: " + self._colspec)
                 if m.group(3) is None:
                     (tname, colname) = m.group(1, 2)
-                    # use default schema
-                    schema = None
+                    schema = self.parent.original.table.schema
                 else:
                     (schema,tname,colname) = m.group(1,2,3)
                 table = Table(tname, self.parent.engine, mustexist=True, schema=schema)
@@ -482,4 +481,4 @@ class SchemaVisitor(object):
         pass
 
             
-            
\ No newline at end of file
+