You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DbUp MS SQL Server schema should use datetime2 instead of datetime. This is really a minor issue in a sense. datetime data type is mostly deprecated, datetime2 does the job better. datetime2 offers also increase precision if that is required. But for just in-place replacement datetime2(3) can be used.
datetime does some rounding also so currently the timestamps aren't really accurate to 100 fractional seconds unlike it looks. datetime also takes up 8 bytes of storage, with datetime2(3), only 7 bytes are consumed (with full precision the same though, 8 bytes). These are the notable differences between the two.
I saw you also had discussions changing to datetimeoffset, that would be fine too and make this obsolete.
Dear @allaev1, I'm not a maintainer or a contributor of this project, but when I looked around, it looks like this project needs some help, so feel free to take it. #(Ask for forgiveness, not for a permission)
DbUp MS SQL Server schema should use
datetime2
instead ofdatetime
. This is really a minor issue in a sense.datetime
data type is mostly deprecated,datetime2
does the job better.datetime2
offers also increase precision if that is required. But for just in-place replacementdatetime2(3)
can be used.datetime
does some rounding also so currently the timestamps aren't really accurate to 100 fractional seconds unlike it looks.datetime
also takes up 8 bytes of storage, withdatetime2(3)
, only 7 bytes are consumed (with full precision the same though, 8 bytes). These are the notable differences between the two.I saw you also had discussions changing to
datetimeoffset
, that would be fine too and make this obsolete.MS documentation:
https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetime2-transact-sql
The text was updated successfully, but these errors were encountered: