EF Migration migrate to 0 call initial creates down

此生再无相见时 提交于 2019-12-24 02:31:50

问题


I'm trying to figure out the syntax to bring migrations down to an empty database as in call the down method on the inital create migration. Does anyone know the proper syntax to call the Down method in a migration something akin to this:

Update-Database -StartupProjectName "Infrastructure.Data" -TargetMigration 0

回答1:


update-database -startupproject someproject -targetmigration 0

That will bring you back to a completely empty database.

I assembled a complete reference to the package manager commands for ef migrations.



来源:https://stackoverflow.com/questions/9996576/ef-migration-migrate-to-0-call-initial-creates-down

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!