-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Bug
Copy link
Description
File a bug
Include your code
I have the following migration
migrationBuilder.AddColumn<string>(
name: "FullName",
table: "Person",
type: "nvarchar(1024)",
maxLength: 1024,
nullable: true,
computedColumnSql: "RTRIM(LTRIM(CONCAT(COALESCE([FirstName] + ' ', ''), COALESCE([LastName] + ' ', ''))))",
stored: true,
collation: "SQL_Latin1_General_CP1_CI_AI");And when I run update-database it generates the following SQL:
ALTER TABLE [Persons] ADD [FullName] AS RTRIM(LTRIM(CONCAT(COALESCE([FirstName] + ' ', ''), COALESCE([LastName] + ' ', '')))) PERSISTED COLLATE SQL_Latin1_General_CP1_CI_AI;But it should generate
ALTER TABLE [Persons] ADD [FullName] AS RTRIM(LTRIM(CONCAT(COALESCE([FirstName] + ' ', ''), COALESCE([LastName] + ' ', '')))) COLLATE SQL_Latin1_General_CP1_CI_AI PERSISTED ;Include provider and version information
EF Core version: 7.0.8 (All ef packages are 7.0.8)
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: NET 6.0
Operating system: Windows 11
IDE: Visual Studio 2022 17.6.4
Reactions are currently unavailable