Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mangled migration generated when altering database collation #23794

Closed
donhuvy opened this issue Jan 2, 2021 · 2 comments · Fixed by #23800 or #23809
Closed

Mangled migration generated when altering database collation #23794

donhuvy opened this issue Jan 2, 2021 · 2 comments · Fixed by #23800 or #23809
Assignees
Labels
area-migrations closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported Servicing-approved type-bug
Milestone

Comments

@donhuvy
Copy link

donhuvy commented Jan 2, 2021

Environment: Microsoft Visual Studio Community 2019 Version 16.8.3 ; .NET 5 version 5.0.101 ; ASP.NET Core Blazor WebAssembly 5, Microsoft SQL Server 2019, Windows 10 x64 version 2004.

Entity Framework Core 5.0.1 , Entity Framework Core Package Mange Console tool 5.0.1

run command

PM> Add-Migration

enter a name

SecondDay

I see error syntax at

migrationBuilder.AlterDatabase(,
                oldCollation: "SQL_Latin1_General_CP1_CI_AS");

image

@donhuvy
Copy link
Author

donhuvy commented Jan 2, 2021

Solution

Add these text

collation: default
migrationBuilder.AlterDatabase(collation: default,
                oldCollation: "SQL_Latin1_General_CP1_CI_AS");

or better, do nothing (delete this line of Migration).

but need fix it in source code of the tool.

@roji roji added the type-bug label Jan 4, 2021
@roji roji self-assigned this Jan 4, 2021
@roji roji changed the title Package Manage Console: PM> Add-Migration, erorr migrationBuilder.AlterDatabase(, oldCollation: "SQL_Latin1_General_CP1_CI_AS"); Mangled migration generated when altering database collation Jan 4, 2021
roji added a commit that referenced this issue Jan 4, 2021
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jan 4, 2021
@ajcvickers ajcvickers added this to the 5.0.3 milestone Jan 4, 2021
roji added a commit that referenced this issue Jan 4, 2021
@ghost ghost closed this as completed in #23800 Jan 4, 2021
ghost pushed a commit that referenced this issue Jan 4, 2021
roji added a commit that referenced this issue Jan 4, 2021
@roji roji reopened this Jan 4, 2021
@donhuvy donhuvy closed this as completed Jan 6, 2021
@roji
Copy link
Member

roji commented Jan 6, 2021

@donhuvy I'm reopening this as the patch for 5.0.3 hasn't yet gone in.

This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-migrations closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported Servicing-approved type-bug
Projects
None yet
3 participants