Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<PackageVersion Include="MSTest" Version="4.0.2" />
<PackageVersion Include="MSTest.TestAdapter" Version="4.0.2" />
<PackageVersion Include="MSTest.TestFramework" Version="4.0.2" />
<PackageVersion Include="Npgsql" Version="9.0.4" />
<PackageVersion Include="Npgsql" Version="10.0.1" />
Copy link

Copilot AI Dec 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This major version update from Npgsql 9.0.4 to 10.0.1 includes breaking changes related to date/time type mappings. According to the release notes, version 10 now "Map[s] date/time to DateOnly/TimeOnly by default."

The codebase uses reader.GetDateTime() to read TIMESTAMP columns (e.g., in TodoRepository.cs lines 42, 69, 104, 137 and TodoTestBase.cs). With the new default type mappings in Npgsql 10, TIMESTAMP columns may map to different .NET types, which could cause runtime exceptions or unexpected behavior.

Consider either:

  1. Testing thoroughly to ensure the TIMESTAMP columns still map correctly to DateTime
  2. Explicitly configuring the legacy date/time mappings if needed using NpgsqlConnection.GlobalTypeMapper.UseLegacyTimestampBehavior() if the new behavior causes issues
  3. Verifying that PostgreSQL TIMESTAMP WITH TIME ZONE is being used (which continues to map to DateTime) rather than TIMESTAMP (which now maps to DateOnly/TimeOnly)
Suggested change
<PackageVersion Include="Npgsql" Version="10.0.1" />
<PackageVersion Include="Npgsql" Version="9.0.4" />

Copilot uses AI. Check for mistakes.
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="NuGet.Protocol" Version="7.0.1" />
<PackageVersion Include="NUnit" Version="4.4.0" />
Expand Down
Loading