You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChristopherHaws
changed the title
Altering nullable column to be not nullable with a default value fails during migration
Altering a nullable column to be not nullable with a default value fails during migration
Nov 23, 2021
Same here, but in my case, the column I want to make non-nullable has no null values, but it still fails to migrate. Which seems different then this issue, what is described here: #21765 (comment)
The following migration results in the following SQL migration script which fails. The
ADD DEFAULT
query should run before theALTER COLUMN
script.SQL Exception
Include provider and version information
EF Core version: 6.0.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 6
Operating system: Windows 11
IDE: Visual Studio 2022
The text was updated successfully, but these errors were encountered: