【发布时间】:2012-08-07 22:15:20
【问题描述】:
这看起来像是一项非常常见的任务,但我找不到简单的方法来完成它。
我想撤消上次应用的迁移。我本来期望一个简单的命令,比如
PM> Update-Database -TargetMigration:"-1"
相反,我能想到的只有:
PM> Get-Migrations
Retrieving migrations that have been applied to the target database.
201208012131302_Add-SystemCategory
201207311827468_CategoryIdIsLong
201207232247409_AutomaticMigration
201207211340509_AutomaticMigration
201207200025294_InitialCreate
PM> Update-Database -TargetMigration:"CategoryIdIsLong"
(至少我可以只使用名称,跳过时间戳...)
有没有更简单的方法?
【问题讨论】:
-
很遗憾,我们已经过了很多年,没有人真正阅读过这个问题。
标签: entity-framework entity-framework-4 database-migration entity-framework-migrations