0

I am working on a ef6 mvc projeect and i deleted all migration records. I want to continue on the project with the current dj. I have a lot of data in there. I added an initial migration but I can't add migration after adding a model. As the tables that are in the initial migration already exist in the db.

Can someone help me how I can keep my zn, and get migrations going again? Thanks

tereško
  • 58,060
  • 25
  • 98
  • 150
Marijn
  • 81
  • 1
  • 3

1 Answers1

0

perhaps try:

  1. Backup the DB as it is FIRST.
  2. You can try and restore the DB with migration history to a DIFFERENT database.
  3. Then copy the __MigrationHistory over.

eg copying table. (SQL server example) You may be using another DB... sorry Copy tables from one database to another in SQL Server

Then test if you that has resolved issue.

Community
  • 1
  • 1
phil soady
  • 11,043
  • 5
  • 50
  • 95