From 0eeaa98179e1e66790ed0bfe093828857fca0652 Mon Sep 17 00:00:00 2001 From: Carlos Salguero Date: Tue, 23 Jan 2018 10:48:04 -0300 Subject: [PATCH] Made tableparser testeable --- tableparser/tableparser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tableparser/tableparser.go b/tableparser/tableparser.go index a3df192..568f4b3 100644 --- a/tableparser/tableparser.go +++ b/tableparser/tableparser.go @@ -158,7 +158,7 @@ func (t *Table) parse() error { // | | | re := regexp.MustCompile(`^(.*?)(?:\((.*?)\)(.*))?$`) - 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" constraints := constraintsAsMap(t.Constraints)