diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-08-07 11:24:29 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-08-07 11:24:29 -0400 |
commit | ed50a003e296ac6bfb998f2b401091d87874cb4c (patch) | |
tree | 5f675cd3096ff7dcc29e69c2f961092b4ee9f273 /lib/sqlalchemy/sql/compiler.py | |
parent | f1626c784efc800a912a815085b9bac609c0d1cb (diff) | |
download | sqlalchemy-ed50a003e296ac6bfb998f2b401091d87874cb4c.tar.gz |
Pass schema_translate_map from DDLCompiler to SQLCompiler
Fixed issue where the
:paramref:`_engine.Connection.execution_options.schema_translate_map`
feature would not take effect when the :meth:`_schema.Sequence.next_value`
function function for a :class:`_schema.Sequence` were used in the
:paramref:`_schema.Column.server_default` parameter and the create table
DDL were emitted.
Fixes: #5500
Change-Id: I74a9fa13d22749d06c8202669f9ea220d9d984d9
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index b8984316c..8e273f67c 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -3661,7 +3661,9 @@ class StrSQLCompiler(SQLCompiler): class DDLCompiler(Compiled): @util.memoized_property def sql_compiler(self): - return self.dialect.statement_compiler(self.dialect, None) + return self.dialect.statement_compiler( + self.dialect, None, schema_translate_map=self.schema_translate_map + ) @util.memoized_property def type_compiler(self): |