Enforce ordering on PostgreSQL get_constraints cols (refs #21134)

This commit is contained in:
Andrew Godwin 2013-09-26 14:52:13 +01:00
parent d5606b5763
commit 59582a8119
1 changed files with 1 additions and 0 deletions

View File

@ -137,6 +137,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
WHERE
kc.table_schema = %s AND
kc.table_name = %s
ORDER BY kc.ordinal_position ASC
""", ["public", table_name])
for constraint, column, kind, used_cols in cursor.fetchall():
# If we're the first column, make the record