diff options
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 a41a149d1..f589e4e4e 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -982,7 +982,9 @@ class DDLCompiler(engine.Compiled): # On some DB order is significant: visit PK first, then the # other constraints (engine.ReflectionTest.testbasic failed on FB2) if table.primary_key: - text += ", \n\t" + self.process(table.primary_key) + pk = self.process(table.primary_key) + if pk: + text += ", \n\t" + pk const = ", \n\t".join(p for p in (self.process(constraint) for constraint in table.constraints |