EntityFramework EF won't let me re-scaffold

c# ef-migrations entity-framework entity-framework-6

Popular Answer

Okay, I think I've discovered the problem here... Since all that was changed in the first migration I tried to re-scaffold was the addition of Indexes, etc., it appears that no schema modifications were made. If EF doesn't notice a change in the provided Migration, it appears that it will attempt to add a new Migration. What I was able to do was skip that Migration and move on to the next, which produced the anticipated results:

Only the Designer Code for migration '201512140935307_SecondMergedMigration' was re-scaffolded. To re-scaffold the entire migration, use the -Force parameter.

I did a database search and the__MigrationHistory looks great, and the Tables do too. If EF had produced a better error message as opposed to attempting to create a new migration when I was obviously trying to re-scaffold, it would have been less troublesome.

1
12/21/2015 1:17:35 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow