rebus-org / Rebus.SqlServer

:bus: Microsoft SQL Server transport and persistence for Rebus
https://mookid.dk/category/rebus
Other
43 stars 42 forks source link

Use DateTimeOffset instead of DateTime #1

Closed mookid8000 closed 6 years ago

mookid8000 commented 7 years ago

because we might as well do so, and it solves some problems that can arise when e.g. moving rows between SQL Server instances.

MrMDavidson commented 6 years ago

One thing I noticed is that all the columns (expiration, visibility, and leaseduntil) currently store local time. I'd say it might be nice to switch them to store UTC? It may even remove the need to switch them to DateTimeOffset at all?

mookid8000 commented 6 years ago

Since the SQL Server transport will start using a table-per-queue layout for queues, and the schema compatibility thus is broken from version 4 to 5, we might as well fix this too.

ALL columns previously of type datetime2 are of type datetimeoffset from Rebus.SqlServer version 5.0.0-b3 and onwards.