Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 4, 2025

Port of #37284

Description
EF Core 10 added support for json SQL Server type for JSON column and it's used by default if the target SQL Server version supports, but no migrations to convert the columns to the new json column type are created because the model snapshot doesn't capture the default store type for JSON columns.

Customer impact
Customers upgrading from EF Core 9 to 10 who use ToJson() won't get migrations generated to update the column type from nvarchar(max) to json. The workaround is to manually specify .HasColumnType("json") on the JSON column.

How found
Customer reported on EF 10.0.0

Regression
No, new feature.

Testing
Test added

Risk
Low. Targeted fix to include the default column type in the model snapshot. Only affects design-time.

Original prompt

Port #37284 to release/9.0-staging, but don't use the code or tests for complex types


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Port changes from PR #37284 to release/9.0-staging Port #37284 to release/9.0-staging: Fix snapshot generation for JSON column types Dec 4, 2025
Copilot AI requested a review from AndriySvyryd December 4, 2025 00:33
@AndriySvyryd AndriySvyryd changed the title Port #37284 to release/9.0-staging: Fix snapshot generation for JSON column types ]release/9.0] Fix snapshot generation to capture column type for JSON columns Dec 4, 2025
@AndriySvyryd AndriySvyryd marked this pull request as ready for review December 4, 2025 01:13
@AndriySvyryd AndriySvyryd requested a review from a team December 4, 2025 01:15
@AndriySvyryd AndriySvyryd changed the title ]release/9.0] Fix snapshot generation to capture column type for JSON columns [release/9.0] Fix snapshot generation to capture column type for JSON columns Dec 4, 2025
@AndriySvyryd AndriySvyryd requested review from a team and artl93 December 5, 2025 18:50
@AndriySvyryd
Copy link
Member

cc @artl93

@SamMonoRT
Copy link
Member

@AndriySvyryd - cutoff for 8 and 9 Jan servicing is today, but this looks like it can wait for next month.

Copy link
Member

@artl93 artl93 left a comment

Choose a reason for hiding this comment

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

Regression, customer reported, blocked. Approved. Please take at same time as #37284.

@AndriySvyryd AndriySvyryd force-pushed the copilot/port-efcore-37284-to-release branch from 10a53a0 to 3532857 Compare December 5, 2025 21:42
@AndriySvyryd AndriySvyryd changed the base branch from release/9.0-staging to release/9.0 December 5, 2025 22:13
@rbhanda rbhanda added this to the 9.0.12 milestone Dec 5, 2025
@AndriySvyryd AndriySvyryd merged commit e5080b7 into release/9.0 Dec 5, 2025
7 checks passed
This was referenced Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants