We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9ca1b5 commit 0eeaa98Copy full SHA for 0eeaa98
tableparser/tableparser.go
@@ -158,7 +158,7 @@ func (t *Table) parse() error {
158
// | | |
159
re := regexp.MustCompile(`^(.*?)(?:\((.*?)\)(.*))?$`)
160
161
- query := "SELECT * FROM `information_schema`.`COLUMNS` WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?"
+ query := "SELECT * FROM `information_schema`.`COLUMNS` WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? ORDER BY ORDINAL_POSITION"
162
163
constraints := constraintsAsMap(t.Constraints)
164
0 commit comments