I\'ve been using Entity framework code first in a project and all the tables have been created /modified a while ago. Now I need to add an unique constraint to a table. I wa
Using add-migration is the way for this. Just use add-migration yourMigrationName and it will automatically create all the files you need.
add-migration yourMigrationName
Then you just alter the Up() and Down() methods with the values that you need