Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Enforce ordering on PostgreSQL get_constraints cols (refs #21134)

  • Loading branch information...
commit 59582a811913466784f90506619882a0555e022e 1 parent d5606b5
@andrewgodwin andrewgodwin authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  django/db/backends/postgresql_psycopg2/introspection.py
View
1  django/db/backends/postgresql_psycopg2/introspection.py
@@ -137,6 +137,7 @@ def get_constraints(self, cursor, table_name):
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
Please sign in to comment.
Something went wrong with that request. Please try again.