summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-12-01 19:03:03 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-12-01 19:03:03 -0500
commit9695faf32981406b12a6468b98d5c9b673f8e219 (patch)
tree1d3721494ae2692fdd3e4ef5b93b532ae56710b3 /lib/sqlalchemy/sql/compiler.py
parentab6946769742602e40fb9ed9dde5f642885d1906 (diff)
downloadsqlalchemy-9695faf32981406b12a6468b98d5c9b673f8e219.tar.gz
- Fixed bug where CREATE TABLE with a no-column table, but a constraint
such as a CHECK constraint would render an erroneous comma in the definition; this scenario can occur such as with a Postgresql INHERITS table that has no columns of its own. fixes #3598
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r--lib/sqlalchemy/sql/compiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index d28ac313b..6766c99b7 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -2163,7 +2163,7 @@ class DDLCompiler(Compiled):
table, _include_foreign_key_constraints= # noqa
create.include_foreign_key_constraints)
if const:
- text += ", \n\t" + const
+ text += separator + "\t" + const
text += "\n)%s\n\n" % self.post_create_table(table)
return text