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
After I updated a Project from .net6 to .net7 and EntityFrameworkCore from 6 to 7 my migrations don't behave as expected.
Creating a new Migration changes the namespace from "web_manager" to "webmanager" in the new migration as well as the snapshot.
When I create another Migration after that, it behaves like the namespace is "webmanager" and puts new files in the directory webmanager.
Changing the namespace of the new migration and snapshot manually back to "web_manager" doesn't seem to change anything.
When I change the classname from "webmanagerDbContextModelSnapshot" back to "web_managerDbContextModelSnapshot" it works for the next Migration.
I know that a namespace with underscore is ugly by itself, but it's not something I can change right now without much effort.
Is it expected behavior, that special characters get removed from Migrations?
If yes, is there a way to prevent that? --namespace "web_manager" just puts the files in another directory, but doesn't prevent renaming.
I've found nothing in documentation or issues regarding this issue.
After I updated a Project from .net6 to .net7 and EntityFrameworkCore from 6 to 7 my migrations don't behave as expected.
Creating a new Migration changes the namespace from "web_manager" to "webmanager" in the new migration as well as the snapshot.
When I create another Migration after that, it behaves like the namespace is "webmanager" and puts new files in the directory webmanager.
Changing the namespace of the new migration and snapshot manually back to "web_manager" doesn't seem to change anything.
When I change the classname from "webmanagerDbContextModelSnapshot" back to "web_managerDbContextModelSnapshot" it works for the next Migration.
I know that a namespace with underscore is ugly by itself, but it's not something I can change right now without much effort.
Is it expected behavior, that special characters get removed from Migrations?
If yes, is there a way to prevent that?
--namespace "web_manager"
just puts the files in another directory, but doesn't prevent renaming.I've found nothing in documentation or issues regarding this issue.
State before
Latest Migration: 20230111234031_Added_QuickFilter_Entity.cs
web_managerDbContextModelSnapshot.cs
First Migration after Update
20230118150116_Test.cs
web_managerDbContextModelSnapshot.cs
Command to create Migration:
dotnet-ef migrations add Test
EF Core version: 6 -> 7
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET6 -> .NET7
Operating system: Windows 11
IDE: dotnet-cli
The text was updated successfully, but these errors were encountered: