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 self-assigned this Dec 4, 2025
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
Copilot finished work on behalf of 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants