We have a Web Forms app using VB.NET. When we first started the project a couple years ago, we though DB Migrations was a great idea! However, the actual use of it was not as grand. So we tried to disable it. We followed the steps as outlined in the dozen or so articles including:
- Remove the Migrations folder
- Remove the __MigrationHistory table
- added
Database.SetInitializer(Of MyContext)(Nothing)
to the constructor of MyContext
I have not found any form of "Disable-Migrations", only re-enabling migrations with more parameters which makes new config files and reinitializes migrations.
Even with all of this, EF keeps querying the database for the __MigrationHistory table which it can't find, so throws an error Invalid object name 'dbo.__MigrationHistory'.
How can we completely remove Migration History so EF stops using it?