Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[12.x] Add native JSON column type support for SQL Server 2025+#58105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
n9rrrx wants to merge1 commit intolaravel:master
base:master
Choose a base branch
Loading
fromn9rrrx:feature/sqlserver-2025-json

Conversation

@n9rrrx
Copy link

Fixes#57965
This PR implements version detection in SqlServerGrammar to utilize the native JSON datatype for SQL Server 2025+ while maintaining the nvarchar(max) fallback for older versions, as requested in the issue.

@taylorotwell
Copy link
Member

Tests are failing.

@taylorotwelltaylorotwell marked this pull request as draftDecember 12, 2025 15:04
$column =new \Illuminate\Support\Fluent(['name' =>'data','type' =>'json']);

// Assert that the Grammar returns the native JSON type.
$this->assertEquals('json',$grammar->typeJson($column));
Copy link
Contributor

Choose a reason for hiding this comment

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

Tests seem to be failing as theSqlServerGrammar@typeJson() method is protected and thus cannot be called here.

You can take a look on how the MySQL Schema Grammar is tested for the UUID fields (Illuminate\Tests\Database\DatabaseMySqlSchemaGrammarTest).

It tests against theBlueprint statements, which should suffice for this case too.

@crynobonecrynobone changed the titleAdd native JSON column type support for SQL Server 2025+ (Fixes #57965)[12.x] Add native JSON column type support for SQL Server 2025+Dec 18, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@rodrigopedrarodrigopedrarodrigopedra left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

->json() still creates nvarchar(max) columns on SQL Server 2025 despite native JSON datatype support

3 participants

@n9rrrx@taylorotwell@rodrigopedra

[8]ページ先頭

©2009-2025 Movatter.jp