修复字段大小写问题

This commit is contained in:
白茶清欢 2021-11-17 11:32:13 +08:00
parent 9fcae03b02
commit 4652955c2a

View File

@ -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
}