M
M
mindgrow2018-02-14 17:55:20
Entity Framework
mindgrow, 2018-02-14 17:55:20

EntityFramework-CodeFirst - How to restore migrations?

When working with the project, I deleted the migration files, as a result, the names of the old entities do not change now, and when the project is launched, an error is generated related to the fact that there are changes in the database and they need to be applied. And when updating via Update-Database - nothing changes.
In the database, I saw the Migrations table... is it possible to restore the migration file from this table?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mindgrow, 2018-02-14
@mindgrow

1. Remove the ___Migrations table in the database
2. Remove the Migrations directory from the project
3. Update-Database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question