From 2cd44d585031b6b218494620fbade77edac6dcff Mon Sep 17 00:00:00 2001 From: xiusin Date: Fri, 28 Feb 2020 10:22:39 +0000 Subject: [PATCH] fix xint colType miss --- dialects/mysql.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dialects/mysql.go b/dialects/mysql.go index 85720280..39680f87 100644 --- a/dialects/mysql.go +++ b/dialects/mysql.go @@ -395,11 +395,11 @@ func (db *mysql) GetColumns(ctx context.Context, tableName string) ([]string, ma colType = "DOUBLE" } - if strings.Contains(colType, "INT UNSIGNED") { + if strings.Contains(colType, "INT UNSIGNED") { colType = strings.TrimRight(colType, " UNSIGNED") } - col.Length = len1 + col.Length = len1 col.Length2 = len2 if _, ok := schemas.SqlTypes[colType]; ok { col.SQLType = schemas.SQLType{Name: colType, DefaultLength: len1, DefaultLength2: len2}