I had an old bank and store that stored user information and product information in the database.
Now I updated the store and changed many tables
On the other hand, I need to extract the previous information I got and use them.
Now I restored the previous bank.
But when I want to make a new migration, it does not allow me and says that this table already exists in the bank.
enter image description here
What should I do ?????
After several searches for this code
public MyDbContext(DbContextOptions<MyDbContext> options) : base(options)
{
Database.EnsureDeleted();
Database.EnsureCreated();
}
1 _I have a backup from the previous database
2_It creates the tables but does not replace the information
3_I tried several other ways