Fix timesatmp #2021
|
@ -313,8 +313,12 @@ func (db *mssql) SQLType(c *schemas.Column) string {
|
|||
if c.Length == 0 {
|
||||
res += "(MAX)"
|
||||
}
|
||||
case schemas.TimeStamp:
|
||||
res = schemas.DateTime
|
||||
case schemas.TimeStamp, schemas.DateTime:
|
||||
if c.Length > 3 {
|
||||
res = "DATETIME2"
|
||||
} else {
|
||||
res = schemas.DateTime
|
||||
}
|
||||
case schemas.TimeStampz:
|
||||
res = "DATETIMEOFFSET"
|
||||
c.Length = 7
|
||||
|
@ -357,7 +361,7 @@ func (db *mssql) SQLType(c *schemas.Column) string {
|
|||
res = t
|
||||
}
|
||||
|
||||
if res == schemas.Int || res == schemas.Bit || res == schemas.DateTime {
|
||||
if res == schemas.Int || res == schemas.Bit {
|
||||
return res
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user