支持CURRENT_TIMESTAMP()解析

This commit is contained in:
白茶清欢 2021-10-25 22:44:48 +08:00
parent 2dcd2918cd
commit 83392ebc71

View File

@ -30,7 +30,7 @@ func ParseCreateTableSql(sql string) (string, error) {
stmt sqlparser.Statement stmt sqlparser.Statement
err error err error
) )
sql = strings.ReplaceAll(sql, " ", "") sql = strings.ReplaceAll(strings.ToUpper(sql), "CURRENT_TIMESTAMP()", "CURRENT_TIMESTAMP")
if stmt, err = sqlparser.ParseStrictDDL(sql); nil != err { if stmt, err = sqlparser.ParseStrictDDL(sql); nil != err {
return "", err return "", err
} }