Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DbUp MS SQL Server schema should use datetime2 instead of datetime #11

Open
tonihele opened this issue Jun 27, 2022 · 2 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@tonihele
Copy link

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.

MS documentation:
https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetime2-transact-sql

@tonihele tonihele added the enhancement New feature or request label Jun 27, 2022
@BekAllaev
Copy link

Hello can I take this issue?

@KUTlime
Copy link

KUTlime commented Jan 20, 2023

Hello can I take this issue?

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)

@mjauernig mjauernig self-assigned this Aug 17, 2023
@droyad droyad transferred this issue from DbUp/DbUp Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: v6
Development

No branches or pull requests

4 participants