stuck in EF migration limbo

后端 未结 7 1492
慢半拍i
慢半拍i 2020-12-20 10:58

i have somehow gotten my EF5 project into a state where I can\'t proceed.

When I do an \'update-database\' i get:

Unable to update database to

7条回答
  •  生来不讨喜
    2020-12-20 11:49

    1. Update-Database –TargetMigration
    2. Add-Migration

      You need to include the timestamp so that migrations knows you want to edit the existing migration rather than scaffolding a new one. This will update the metadata for the last migration to match the current model.

    3. Update-Database

    Source https://docs.microsoft.com/en-gb/ef/ef6/modeling/code-first/migrations/teams#resolving-the-merge-conflict

提交回复
热议问题