After making some (of in fact a lot of) changes to my persistent classes I get the error: Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong.
I’m using Entity Framework 6, code first and automatic migrations.
How did I solve this:
– run in the package manager console : update-database -verbose -sourcemigration $initialdatabase
Now you can see what is causing the migration to fail. In my case it was changing a one-many relationship to a many-to-many using a extra (explicit) linking table.
Remark: often the issue is with foreignkey and relationships. Since you perhaps try to modify the relationships, it could be necessary to modify of delete the related data, so SQL server can delete and recreate references on empty tables