From 83392ebc71d68e1688eacf1a3cb99fa2095b4afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 25 Oct 2021 22:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81CURRENT=5FTIMESTAMP()?= =?UTF-8?q?=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/sql2go/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/sql2go/parser.go b/tool/sql2go/parser.go index e92331f..0bb64da 100644 --- a/tool/sql2go/parser.go +++ b/tool/sql2go/parser.go @@ -30,7 +30,7 @@ func ParseCreateTableSql(sql string) (string, error) { stmt sqlparser.Statement err error ) - sql = strings.ReplaceAll(sql, " ", "") + sql = strings.ReplaceAll(strings.ToUpper(sql), "CURRENT_TIMESTAMP()", "CURRENT_TIMESTAMP") if stmt, err = sqlparser.ParseStrictDDL(sql); nil != err { return "", err }