I have a local database that is currently in it\'s second version and should now go to it\'s third version.
The code for the previous migrations was generated by ano
In my case I was doing a migration where I added fields to an existing table and was ending up with empty Up
and Down
methods,
I had something like this:
public bool ExistingField { get; set; }
bool NewField { get;set; }
Can you spot the difference...?
If you make this mistake rerun the migration with the same name (you probably will need to add the -Force
parameter to scaffold it full).
PS. Always make sure your project builds fully before attempting to do any kind of EF command. If your project doesn't already build you're asking for trouble.