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