There is already an object named 'xxx' in the database

ef-migrations entity-framework-core

Question

I am using Entity Framework Core and doing migration. Since my program is purely development stage, how do I force the migration (overwrite the existing db scheme)? I tried with command add-migration someText and update-database but no success.

1
0
8/31/2019 11:05:39 AM

Popular Answer

This error shows up because you probably have migration that includes table, column same like in one of previous migrations. Check every migration if there is no some duplicates. It sometimes happen when you revert your snapshot file. If you want more help with this issue you will need provide more information about your migrations and schema.

0
9/18/2019 9:53:55 AM


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