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

Add-Migration has no 'IgnoreChanges' parameter #1435

Closed
steamwings opened this issue Oct 31, 2019 — with docs.microsoft.com · 7 comments
Closed

Add-Migration has no 'IgnoreChanges' parameter #1435

steamwings opened this issue Oct 31, 2019 — with docs.microsoft.com · 7 comments
Assignees

Comments

Copy link

When I run Add-Migration InitialCreate –IgnoreChanges in package manager console, I get Add-Migration : A parameter cannot be found that matches parameter name 'IgnoreChanges'.
I just created this project yesterday and I'm running VS2019 which shows no relevant updates available.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@smitpatel
Copy link
Member

@steamwings - That could be product issue. Are you using EF Core or EF6?

Copy link
Author

It's an ASP.NET Core project. I can see I have the EF6 tools component installed, but I don't see a separate component to install for EF Core.

@smitpatel
Copy link
Member

Can you share a repro project which we can investigate?

Moving this to EF6 repo.

@smitpatel smitpatel transferred this issue from dotnet/EntityFramework.Docs Oct 31, 2019
@steamwings
Copy link
Author

Here's the whole project:
https://github.com/steamwings/aspnetefcore-dbfirst-migration
There's also a text file called PackageManagerSession.txt in case that's helpful.

@ajcvickers ajcvickers added this to the 6.4.0 milestone Nov 1, 2019
@bricelam
Copy link
Contributor

bricelam commented Nov 1, 2019

The parameter is there in 6.3.0. I suspect you're inadvertently using the EF Core cmdlet.

https://github.com/aspnet/EntityFramework6/blob/2f61cffeb5e09708a20bc6e3f4414b43407170a3/src/NuGet/EntityFramework/tools/EntityFramework6.psm1#L380

@bricelam bricelam removed this from the 6.4.0 milestone Nov 1, 2019
@steamwings
Copy link
Author

Yep, I should have been looking at the EF Core reference instead of the EF6 reference. I hope y'all are able to bring migration support to existing databases with EF Core. Thanks!

@bricelam
Copy link
Contributor

bricelam commented Nov 1, 2019

Note, to do this on EF Core, comment out the contents of the Up method, run the migration, then uncomment. Issue dotnet/efcore#2167 is about making this experience better.

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

No branches or pull requests

4 participants