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
When doing exactly that, the script doesn't work because there is no GO between statements anymore.
the script complains that column FullName doesn't exist
Your code
//copied from the docsmigrationBuilder.AddColumn<string>(name:"FullName",table:"Customer",nullable:true);migrationBuilder.Sql(@" UPDATE Customer SET FullName = FirstName + ' ' + LastName;");migrationBuilder.DropColumn(name:"FirstName",table:"Customer");migrationBuilder.DropColumn(name:"LastName",table:"Customer");
Stack traces
Verbose output
EF Core version
9.0.0
Database provider
No response
Target framework
No response
Operating system
No response
IDE
No response
The text was updated successfully, but these errors were encountered:
On my computer with sql server 2022 express (16.0.1135.2), I get the following error using the script copied from your post:
Msg 207, Level 16, State 1, Line 5
Invalid column name 'FullName'.
Bug description
https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/managing?tabs=dotnet-core-cli#adding-raw-sql
When doing exactly that, the script doesn't work because there is no GO between statements anymore.
the script complains that column FullName doesn't exist
Your code
Stack traces
Verbose output
EF Core version
9.0.0
Database provider
No response
Target framework
No response
Operating system
No response
IDE
No response
The text was updated successfully, but these errors were encountered: