EF迁移迁移到0调用初始化创建 [英] EF Migration migrate to 0 call initial creates down

查看:134
本文介绍了EF迁移迁移到0调用初始化创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将语法迁移到一个空数据库,就像调用init创建迁移的down方法一样。有没有人知道在迁移中调用Down方法的正确语法类似于:

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


推荐答案

update-database -startupproject someproject -targetmigration 0

这将带你回到一个完全空数据库。

That will bring you back to a completely empty database.

我组装了一个完整的参考到ef迁移的包管理器命令。

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

这篇关于EF迁移迁移到0调用初始化创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆