1. suport date time '2070-03-30 00:00:00',timestamp can't support large date time.
This commit is contained in:
parent
52c5c8127c
commit
8d029a9db3
@ -101,9 +101,9 @@ func (s *mysql) DataTypeOf(field *StructField) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := field.TagSettings["NOT NULL"]; ok {
|
if _, ok := field.TagSettings["NOT NULL"]; ok {
|
||||||
sqlType = fmt.Sprintf("timestamp%v", precision)
|
sqlType = fmt.Sprintf("DATETIME%v", precision)
|
||||||
} else {
|
} else {
|
||||||
sqlType = fmt.Sprintf("timestamp%v NULL", precision)
|
sqlType = fmt.Sprintf("DATETIME%v NULL", precision)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user