Fixed #29480 -- Made MySQL backend retrieve constraint columns in their defined order.
This commit is contained in:
parent
d22b90b4ea
commit
4fba321a45
|
@ -160,6 +160,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||||
WHERE
|
WHERE
|
||||||
kc.table_schema = DATABASE() AND
|
kc.table_schema = DATABASE() AND
|
||||||
kc.table_name = %s
|
kc.table_name = %s
|
||||||
|
ORDER BY kc.`ordinal_position`
|
||||||
"""
|
"""
|
||||||
cursor.execute(name_query, [table_name])
|
cursor.execute(name_query, [table_name])
|
||||||
for constraint, column, ref_table, ref_column in cursor.fetchall():
|
for constraint, column, ref_table, ref_column in cursor.fetchall():
|
||||||
|
|
Loading…
Reference in New Issue