diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-10-12 00:11:00 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-10-12 00:11:00 +0000 |
commit | d6239f2262f44cdf1c87d2ded28d0fe45ad8963d (patch) | |
tree | 9bca598e26cbd0108a9ab9d9419fc697f1024bc8 /lib/sqlalchemy/sql/compiler.py | |
parent | 114ad36894ab37280106feb15e5421ac124c6834 (diff) | |
download | sqlalchemy-d6239f2262f44cdf1c87d2ded28d0fe45ad8963d.tar.gz |
- added "ddl" argument to the "on" callable of DDLElement [ticket:1538]
- fixed the imports in the "postgres" cleanup dialect
- renamed "schema_item" attribute/argument of DDLElement
to "target".
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index b4b901067..4cf4bd869 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -922,11 +922,11 @@ class DDLCompiler(engine.Compiled): def visit_ddl(self, ddl, **kwargs): # table events can substitute table and schema name context = ddl.context - if isinstance(ddl.schema_item, schema.Table): + if isinstance(ddl.target, schema.Table): context = context.copy() preparer = self.dialect.identifier_preparer - path = preparer.format_table_seq(ddl.schema_item) + path = preparer.format_table_seq(ddl.target) if len(path) == 1: table, sch = path[0], '' else: @@ -934,7 +934,7 @@ class DDLCompiler(engine.Compiled): context.setdefault('table', table) context.setdefault('schema', sch) - context.setdefault('fullname', preparer.format_table(ddl.schema_item)) + context.setdefault('fullname', preparer.format_table(ddl.target)) return ddl.statement % context |