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 <jerry@noreply.gitea.io>
Co-Committed-By: Jerry <jerry@noreply.gitea.io>
This commit is contained in:
Jerry 2020-10-10 01:18:03 +00:00 committed by Lunny Xiao
parent 0c1b815227
commit b39ff4b4d3
1 changed files with 5 additions and 2 deletions

View File

@ -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" { if colType == "FLOAT UNSIGNED" {
colType = "FLOAT" colType = schemas.Float
} }
if colType == "DOUBLE UNSIGNED" { if colType == "DOUBLE UNSIGNED" {
colType = "DOUBLE" colType = schemas.Double
} }
col.Length = len1 col.Length = len1
col.Length2 = len2 col.Length2 = len2