mirror of
https://github.com/django/django.git
synced 2025-03-31 19:46:42 +00:00
Enforce ordering on PostgreSQL get_constraints cols (refs #21134)
This commit is contained in:
parent
d5606b5763
commit
59582a8119
@ -137,6 +137,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
|||||||
WHERE
|
WHERE
|
||||||
kc.table_schema = %s AND
|
kc.table_schema = %s AND
|
||||||
kc.table_name = %s
|
kc.table_name = %s
|
||||||
|
ORDER BY kc.ordinal_position ASC
|
||||||
""", ["public", table_name])
|
""", ["public", table_name])
|
||||||
for constraint, column, kind, used_cols in cursor.fetchall():
|
for constraint, column, kind, used_cols in cursor.fetchall():
|
||||||
# If we're the first column, make the record
|
# If we're the first column, make the record
|
||||||
|
Loading…
x
Reference in New Issue
Block a user