Update database in Entity Framework Core

654 Views Asked by At

I got a project and I restored that database (from a backup). When I added a new migration for some changes, I get this error:

There is already an object named 'Languages' in the database.

But I want to change some other table, I don't want to re-create database again.

Please help me :(

1

There are 1 best solutions below

0
On BEST ANSWER

Did you lose the previous migration files? If so, you could remove the changes you have made, apply the baseline migration, then add your changes back and add a 2nd migration and update the database.

For more details, you can refer to this thread.