I created a web api application in
.net core 2.0 and I create my database using code first approach and using the commands
Now I made some changes in my model classes and created a new migration using
add-migration 2ndMigration command. It created the migration with
Down methods. When I try to update database with this migration it gives me an error that
Table 'TableName' already exists.
There's no create table command in the migration.
Why I'm seeing this error? or what's the command I need to run to update the database?
Add-Migration Initial -IgnoreChanges -ConfigurationTypeName YourDbConfigurationName and add
-force if needed.
After that use your regular