From b39ff4b4d3387de5432e64f407a31ee7992f9361 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sat, 10 Oct 2020 01:18:03 +0000 Subject: [PATCH] add INT UNSIGNED convert to INT (#1806) reset add INT UNSIGNED convert to INT add INT UNSIGNED convert to INT Co-authored-by: Jerry <85411418@qq.com> Reviewed-on: https://gitea.com/xorm/xorm/pulls/1806 Co-Authored-By: Jerry Co-Committed-By: Jerry --- dialects/mysql.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dialects/mysql.go b/dialects/mysql.go index 32e18a17..5f1d28e5 100644 --- a/dialects/mysql.go +++ b/dialects/mysql.go @@ -387,11 +387,14 @@ func (db *mysql) GetColumns(queryer core.Queryer, ctx context.Context, tableName } } } + if colType == "INT UNSIGNED" { + colType = schemas.Int + } if colType == "FLOAT UNSIGNED" { - colType = "FLOAT" + colType = schemas.Float } if colType == "DOUBLE UNSIGNED" { - colType = "DOUBLE" + colType = schemas.Double } col.Length = len1 col.Length2 = len2