SQL Server database, default mapping of time type to DATETIME2

This commit is contained in:
CyJaySong 2023-07-14 17:20:32 +08:00
parent a16551c6e7
commit 7bb3224115
1 changed files with 1 additions and 0 deletions

View File

@ -320,6 +320,7 @@ func (db *mssql) SQLType(c *schemas.Column) string {
res += "(MAX)" res += "(MAX)"
} }
case schemas.TimeStamp, schemas.DateTime: case schemas.TimeStamp, schemas.DateTime:
c.Length = 7
return "DATETIME2" return "DATETIME2"
case schemas.TimeStampz: case schemas.TimeStampz:
res = "DATETIMEOFFSET" res = "DATETIMEOFFSET"