From 4652955c2ade588bb98cce3d4fb5e07ba80bdbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Wed, 17 Nov 2021 11:32:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=97=E6=AE=B5=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99=E9=97=AE=E9=A2=98?= 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 0bb64da..ea12b53 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(strings.ToUpper(sql), "CURRENT_TIMESTAMP()", "CURRENT_TIMESTAMP") + sql = strings.ReplaceAll(strings.ReplaceAll(sql, "CURRENT_TIMESTAMP()", "CURRENT_TIMESTAMP"), "current_timestamp()", "CURRENT_TIMESTAMP") if stmt, err = sqlparser.ParseStrictDDL(sql); nil != err { return "", err }