I am using MVC 5 with .NET Framework 4.5.1. with the first code. I also use Migrations with SQL Server 2012 and (localdb) \ v11.0.
I am developing a project using C # and MVC5. During development, I created many new tables on my development computer and changed the "Name" field, which, in my opinion, has an index for the system. I added it and deleted it several times.
After that I added a lot of new unrelated tables, but for some reason my migrations started giving me external constraint errors due to indexes for the Name field. These errors continued to multiply when I corrected them, so I decided to return to the original state in the migration and reset, using the current position as a new starting point. I was hoping the production table would look at this new starting point in db development and resynchronize itself with the development state. I thought somewhere I read somewhere that the production database matches the db development itself and updates itself. I believe that there is a migration file in production db that matches the file in the db development file, so the file is clearly not synchronized. I have considered deleting data in it, but I hold on until I get advice.
In any case, I changed the name of the migration directory on the Dev computer and excluded it from the project. Then I reinitialized my tables (using the new db name in my local db) on the developer's computer and reloaded it with the initialization data. Everything worked.
Now I had a new problem: my db derivatives and my db development were different, and my migration to the development computer was set up to create new files, while an older change was expected in the production state. Every time I tried to update production db using a development computer, I continued to receive an error message that the files existed - which, of course, they did.
, . db, , , , . , db , . , . , - .
1: ( ) db db , , db ?
2: , ?