Skip to content

Commit

Permalink
Fix column order
Browse files Browse the repository at this point in the history
  • Loading branch information
neoatlan committed Aug 17, 2023
1 parent b139c68 commit 81598e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django/db/backends/mysql/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ def get_constraints(self, cursor, table_name):
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():
Expand Down

0 comments on commit 81598e5

Please sign in to comment.