Azure SQL Image `2022-latest` does not support `json` column type
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
# Azure SQL Image `2022-latest` does not support `json` column type
## Issue
Since the .NET 10 is released, They announced that Azure SQL now supports `json` column type.
However, the current `Aspire.Hosting.Azure.Sql` nuget package produces `mcr.microsoft.com/mssql/server` docker image with `2022-latest` tag.
Which does not support `json` column type yet.
## Solution
According to the [document](https://learn.microsoft.com/ko-kr/sql/t-sql/data-types/json-data-type?view=sql-server-ver17), It supports from `2025-latest` tag.
We need to bump the nuget package to use image with `2025-latest` tag.
## Temporary solution
```cs
var database = builder
.AddAzureSqlServer("database")
.RunAsContainer(config =>
{
config.WithImageRegistry("mcr.microsoft.com")
config.WithImage("mssql/server", "2025-latest")
});
```
## Related
- [What's New in EF Core 10 - Microsoft/learn](https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-10.0/whatsnew)
- [JSON data type - Microsoft/learn](https://learn.microsoft.com/en-us/sql/t-sql/data-types/json-data-type?view=sql-server-ver17)
### Expected Behavior
The `Aspire.Hosting.Azure.Sql` nuget package should use `mcr.microsoft.com/mssql/server:2025-latest` image to support `json` column type.
### Steps To Reproduce
1. Create a new project using `Aspire.Hosting.Azure.Sql` nuget package.
2. Define an entity with `json` column type.
3. Create a migration using `dotnet ef migrations add ` command.
4. Run the migration using `dotnet ef database update` command.
### Exceptions (if any)
Exception message indicating that `json` column type is not supported.
### .NET Version info
- .NET 10
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.