Kaydet (Commit) 4fba321a authored tarafından Thomas Grainger's avatar Thomas Grainger Kaydeden (comit) Tim Graham

Fixed #29480 -- Made MySQL backend retrieve constraint columns in their defined order.

üst d22b90b4
......@@ -160,6 +160,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
WHERE
kc.table_schema = DATABASE() AND
kc.table_name = %s
ORDER BY kc.`ordinal_position`
"""
cursor.execute(name_query, [table_name])
for constraint, column, ref_table, ref_column in cursor.fetchall():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment