From a7f766d7c7fd6c53eb0019e32569e915b3f31eb4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 25 Feb 2011 13:20:43 -0500 Subject: - establish an "insert" option for events to control ordering if needed (not needed yet tho) - render foreign key constraints in the order in which they were cerated --- lib/sqlalchemy/sql/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 781072dd0..d6a020bdc 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -1272,7 +1272,7 @@ class DDLCompiler(engine.Compiled): if table.primary_key: constraints.append(table.primary_key) - constraints.extend([c for c in table.constraints + constraints.extend([c for c in table._sorted_constraints if c is not table.primary_key]) return ", \n\t".join(p for p in -- cgit v1.2.1