]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix non2.4 gremlin
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 6 Aug 2009 22:16:53 +0000 (22:16 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 6 Aug 2009 22:16:53 +0000 (22:16 +0000)
lib/sqlalchemy/sql/compiler.py

index 6bfad4a76cb07909dd533dab2fde6054f3133e04..b6d717356816eef2746f4dc6268b9ace19b31b5f 100644 (file)
@@ -1006,7 +1006,7 @@ class DDLCompiler(engine.Compiled):
         return "ALTER TABLE %s DROP CONSTRAINT %s%s" % (
             self.preparer.format_table(drop.element.table),
             self.preparer.format_constraint(drop.element),
-            " CASCADE" if drop.cascade else ""
+            drop.cascade and " CASCADE" or ""
         )
     
     def get_column_specification(self, column, **kwargs):