question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

k ef remove to current migration (and squash migrations)

See original GitHub issue

right now if I have 25 migrations and I do a

k ef migration apply 0

then I have to execute

k ef migration remove

25 times to get the migrations clean. I know this is not a very real scenario, but I was thinking if a remove to current would be a good idea

k ef migration remove notapplied

sorry if there is something to do this already.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rowanmillercommented, May 12, 2015

Triage Added an issue to track the squash scenario https://github.com/aspnet/EntityFramework/issues/2174. Think we have everything covered now.

0reactions
Bartmaxcommented, Apr 19, 2015

sounds good. thank you @bricelam

Read more comments on GitHub >

github_iconTop Results From Across the Web

Entity Framework rollback and remove bad migration
This list shows the most recent applied migrations first. Pick the migration that occurs in the list after the one you want to...
Read more >
Managing Migrations - EF Core
As your model changes, migrations are added and removed as part of normal development, and the migration files are checked into your ...
Read more >
Squash migrations · Issue #2174 · dotnet/efcore
@rowanmiller rowanmiller mentioned this issue on May 12, 2015. k ef remove to current migration (and squash migrations) #2031.
Read more >
Squashing EF Core Migrations Safely
Resetting your migrations to squash the history can be a very helpful ... as we will remove the CURRENT migration history and insert...
Read more >
How to work with EF Core migrations in ASP.NET Core
In other words, the command will delete the most recent migration from the Migrations folder of the project and change the database schema...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found