2
我创建了数据库的模式对VS Mac和使用终端创建迁移:与迁移CLI在VS的Mac(DOTNET的酷睿2)更新数据库
dotnet ef migrations add IntitialMigration
然后,我更新了我的数据库:
dotnet ef database update
但之后我改变了我的模型,我创建了另一个迁移:
dotnet ef migrations add SecondMigration
并试图updat E中的数据库:
dotnet ef database update SecondMigration
我收到以下错误:
There is already an object named 'Emails' in the database.
我已经搜查,我发现了一个可能的解决方案:
Add-Migration SecondMigration -IgnoreChanges
但在PMC在Windows这只作品。我使用VS for Mac,所有命令都在终端上输入。更改模型后,有人知道如何使用Migrations更新数据库吗?