Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rescaffold migration in Entity Framework Core

Tags:

In EF .Net a migration can be rescaffolded with the following:

Add-Migration <migration_name> -force 

Can i force rescaffold same migration in Entity Framework Core?

like image 299
Ankit Avatar asked Jan 10 '17 14:01

Ankit


People also ask

How do I enable-migrations in Entity Framework Core?

Migrations are enabled by default in EF Core. They are managed by executing commands. If you have Visual Studio, you can use the Package Manager Console (PMC) to manage migrations. Alternatively, you can use a command line tool to execute Entity Framework CLI commands to create a migration.

How do I migrate in Entity Framework?

Step 1 − Before running the application you need to enable migration. Step 2 − Open Package Manager Console from Tools → NuGet Package Manger → Package Manger Console. Step 3 − Migration is already enabled, now add migration in your application by executing the following command.

What is a database migration in Entity Framework ef core?

The migrations feature in EF Core provides a way to incrementally update the database schema to keep it in sync with the application's data model while preserving existing data in the database.


1 Answers

There is no such option.

But you may remove it and create again:

Remove-Migration Add-Migration <migration_name> 
like image 149
Dmitry Avatar answered Sep 30 '22 06:09

Dmitry