Are there a GUI or addon for Visual Studio to manage Entity Framework Code First migrations? For example a useful feature would be where you can select a migration from a list and perform an Update-Database with it as a TargetMigration.
(I was thinking of writing such a tool, but am unsure about how to communicate with the Nuget Package Manager Console, where the commands are inserted.)
Delete your Migrations folder. Create a new migration and generate a SQL script for it. In your database, delete all rows from the migrations history table. Insert a single row into the migrations history, to record that the first migration has already been applied, since your tables are already there.
From the Tools menu, select NuGet Package Manager > Package Manager Console. The enable-migrations command creates a Migrations folder in the ContosoUniversity project, and it puts in that folder a Configuration. cs file that you can edit to configure Migrations.
I think there is no such a tool with features that you want, so I beleive there is no direct answer to your question. But I found these;
How about:
https://www.red-gate.com/blog/database-lifecycle-management/deploying-entity-framework-code-first-migrations-with-t-sql
Or next generation tool for os-free (command line bassed):
http://www.bricelam.net/2014/09/14/migrations-on-k.html
Interesting one:
https://flywaydb.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With