fix insert time is nil error

This commit is contained in:
jeck.han 2018-11-13 23:12:25 +08:00
parent 4e21af9122
commit 1663d9f3db
1 changed files with 4 additions and 1 deletions

View File

@ -1545,7 +1545,10 @@ func (engine *Engine) formatColTime(col *core.Column, t time.Time) (v interface{
if col.Nullable {
return nil
}
return ""
if col.Default != "" {
return col.Default
}
return engine.formatTime(col.SQLType.Name, t)
}
if col.TimeZone != nil {