diff options
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index fd7e7d773..8a8c773f8 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -1726,6 +1726,7 @@ class DDLCompiler(engine.Compiled): ', '.join(preparer.quote(f.column.name, f.column.quote) for f in constraint._elements.values()) ) + text += self.define_constraint_match(constraint) text += self.define_constraint_cascades(constraint) text += self.define_constraint_deferrability(constraint) return text @@ -1765,6 +1766,12 @@ class DDLCompiler(engine.Compiled): text += " INITIALLY %s" % constraint.initially return text + def define_constraint_match(self, constraint): + text = "" + if constraint.match is not None: + text += " MATCH %s" % constraint.match + return text + class GenericTypeCompiler(engine.TypeCompiler): def visit_CHAR(self, type_): |