Skip to content

Fix alter column type JSON to nVarchar#38464

Open
atiq-bs23 wants to merge 1 commit into
dotnet:mainfrom
atiq-bs23:fix-json-to-nvarchar-column-migration
Open

Fix alter column type JSON to nVarchar#38464
atiq-bs23 wants to merge 1 commit into
dotnet:mainfrom
atiq-bs23:fix-json-to-nvarchar-column-migration

Conversation

@atiq-bs23

Copy link
Copy Markdown

Fixes #38364

SQL Server's native json type cannot be implicitly converted to nvarchar in ALTER COLUMN. When the old column type is json, the generator now uses rename → add → CONVERT-copy → drop instead.

  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow this format:
  • Tests for the changes have been added (for bug fixes / features)
  • Code follows the same patterns and style as existing code in this repo

@atiq-bs23 atiq-bs23 requested a review from a team as a code owner June 19, 2026 07:49
@atiq-bs23

Copy link
Copy Markdown
Author

@dotnet-policy-service agree

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.

EF Core 10 generates invalid down migration for MSSQL nvarchar(max) to json upgrade

1 participant