lewiguez
lewiguez

Reputation: 3823

Delete a specific EntityFramework Migration

Is there a way to delete an automatic migration in the migration history of a project using Entity Framework Migrations? This is a code-based EF project that's has a mix of explicit and automatic updates. There is an automatic update that deletes a table of content and isn't necessary. I'd like to be able to just remove it.

For some reason, the database it's running against doesn't have a __MigrationHistory table. (At least I don't see it in the list of tables for the databases or the list of System Tables in the database. Not sure if you have to enable viewing those somehow or not inside SSMS).

Please offer any advice you have. I'm open to whatever solution as long as I can maintain all that application's data.

Upvotes: 2

Views: 6375

Answers (1)

Reza F.Rad
Reza F.Rad

Reputation: 230

I hope it is not too late.

The __MigrationHistory table is made in System Tables section on Target Database(Same as base mode Database)

Upvotes: 4

Related Questions