From 69a4a3925ea75f564d0636b48716264a9adbd0b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sun, 17 Aug 2025 12:45:04 +0800 Subject: [PATCH] =?UTF-8?q?upgrade:=20=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=AF=86=E5=88=AB=EF=BC=8C=E6=94=AF=E6=8C=81=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E6=97=A0=E7=AC=A6=E5=8F=B7=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql2go/parser.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql2go/parser.go b/sql2go/parser.go index d67f9aa..174113e 100644 --- a/sql2go/parser.go +++ b/sql2go/parser.go @@ -110,6 +110,10 @@ func generateTable(tableName string, modelStructName string, columnList []*sqlpa "{COMMENT}": comment, "{TYPE}": sqlTypeMap[item.Type.Type], } + if item.Type.Unsigned { + // 无符号 + data["{TYPE}"] = sqlTypeMap[item.Type.Type+" unsigned"] + } /*if data["{FIELD}"] == "ID" { basic.PrimaryFieldType = data["{TYPE}"] }*/