Steven Sproat
Steven Sproat

Reputation: 4578

Delete all migrations and start migrations from current DB

I have about 150 migrations currently in a project, and all the .resx files are causing my DLL's size to balloon - the compiled DLL is over 7.5MB now which is pretty crazy.

Is there a way to clear all existing migrations, and tell Entity Framework that the current version of the database is the starting point, and any future migrations will use this database as the base one.

Upvotes: 0

Views: 81

Answers (1)

Masoud
Masoud

Reputation: 8171

You can delete all migrations file, delete __MigrationHistory table in your database and then run following commands in Package Manager Console:

PM>Enable-Migrations
PM>AddMigration [A_Name_For_Your_Migration] -IgnoreChanges
PM>Update-Database

Upvotes: 1

Related Questions