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更新數據庫嗎?