Skip to content

Commit 0eeaa98

Browse files
Made tableparser testeable
1 parent e9ca1b5 commit 0eeaa98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tableparser/tableparser.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (t *Table) parse() error {
158158
// | | |
159159
re := regexp.MustCompile(`^(.*?)(?:\((.*?)\)(.*))?$`)
160160

161-
query := "SELECT * FROM `information_schema`.`COLUMNS` WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?"
161+
query := "SELECT * FROM `information_schema`.`COLUMNS` WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? ORDER BY ORDINAL_POSITION"
162162

163163
constraints := constraintsAsMap(t.Constraints)
164164

0 commit comments

Comments
 (0)