The Wayback Machine - https://web.archive.org/web/20201206193245/https://github.com/dotnet/efcore/issues/23222
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

Migration name filter #23222

Open
lugospod opened this issue Nov 6, 2020 · 1 comment
Open

Migration name filter #23222

lugospod opened this issue Nov 6, 2020 · 1 comment

Comments

@lugospod
Copy link

@lugospod lugospod commented Nov 6, 2020

EF Core uses a class Migration, and if you add a new migration with name "Migration" it will break the build.

dotnet ef migrations add Migration

results with Circular base class dependency involving 'Migration' and 'Migration'

I recommend that "migrations add" adds a validation for this...

Include stack traces

Migrations/20201106105308_Migration.cs(6,26): error CS0146: Circular base class dependency involving 'Migration' and 'Migration' [/opt/app/src/src/NM.DAL/NM.DAL.csproj]
Migrations/20201106105308_Migration.cs(8,33): error CS0115: 'Migration.Up(MigrationBuilder)': no suitable method found to override [/opt/app/src/src/NM.DAL/NM.DAL.csproj]
Migrations/20201106105308_Migration.cs(167,33): error CS0115: 'Migration.Down(MigrationBuilder)': no suitable method found to override [/opt/app/src/src/NM.DAL/NM.DAL.csproj]
Migrations/20201106105308_Migration.Designer.cs(16,33): error CS0115: 'Migration.BuildTargetModel(ModelBuilder)': no suitable method found to override [/opt/app/src/src/NM.DAL/NM.DAL.csproj]

Include provider and version information

EF Core version: 3.1.9
Database provider: Postgresql
Target framework: NET 3.1
Operating system: Windows 10
IDE: Visual Studio 2019 16.7.7

@ajcvickers
Copy link
Member

@ajcvickers ajcvickers commented Nov 7, 2020

Note from triage: we should add this and other similar conflicts to the check we already have. But low priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.