Fix time for oracle
This commit is contained in:
parent
dbc2de380b
commit
66adc594d9
|
@ -40,6 +40,10 @@ func FormatColumnTime(dialect Dialect, dbLocation *time.Location, col *schemas.C
|
||||||
}
|
}
|
||||||
return t.Format(layout), nil
|
return t.Format(layout), nil
|
||||||
case schemas.DateTime, schemas.TimeStamp:
|
case schemas.DateTime, schemas.TimeStamp:
|
||||||
|
if dialect.URI().DBType == schemas.ORACLE {
|
||||||
|
return t, nil
|
||||||
|
}
|
||||||
|
|
||||||
var layout = "2006-01-02 15:04:05"
|
var layout = "2006-01-02 15:04:05"
|
||||||
if col.Length > 0 {
|
if col.Length > 0 {
|
||||||
layout += "." + strings.Repeat("0", col.Length)
|
layout += "." + strings.Repeat("0", col.Length)
|
||||||
|
|
Loading…
Reference in New Issue