public partial class _222 : DbMigration
{
public override void Up()
{
//DropForeignKey("dbo.Assets", "AssetBorrow_Id", "dbo.AssetBorrows");
//DropIndex("dbo.Assets", new[] { "AssetBorrow_Id" });
CreateTable(
"dbo.AssetBorrowSubs",
c => new
{
Id = c.Guid(nullable: false),
AssetCode = c.String(),
AssetName = c.String(),
AssetNum = c.String(),
Brand = c.String(),
Model = c.String(),
AssetId = c.String(),
Created = c.DateTime(nullable: false),
AssetBorrow_Id = c.Guid(),
})
.PrimaryKey(t => t.Id)
.ForeignKey("dbo.AssetBorrows", t => t.AssetBorrow_Id)
.Index(t => t.AssetBorrow_Id); //DropColumn("dbo.Assets", "AssetBorrow_Id");
} public override void Down()
{
//AddColumn("dbo.Assets", "AssetBorrow_Id", c => c.Guid());
DropForeignKey("dbo.AssetBorrowSubs", "AssetBorrow_Id", "dbo.AssetBorrows");
DropIndex("dbo.AssetBorrowSubs", new[] { "AssetBorrow_Id" });
DropTable("dbo.AssetBorrowSubs");
// CreateIndex("dbo.Assets", "AssetBorrow_Id");
// AddForeignKey("dbo.Assets", "AssetBorrow_Id", "dbo.AssetBorrows", "Id");
}
}

最新文章

  1. UESTC 1237 质因子分解
  2. JS事件冒泡与捕获
  3. CodeForces 732D Exams (二分)
  4. Spark小课堂Week5 Scala初探
  5. 在jsp中运用ajax实现同一界面不跳转处理事件
  6. 一个简单的makefile,一次性编译本文件夹下所有的cpp文件
  7. Delphi如何让程序最小化到任务栏(截取WM_SYSCOMMAND后,调用Shell_NotifyIcon)
  8. js的兼容性问题
  9. [Javascript] The JSON.stringify API
  10. Thrift官方安装手冊(译)
  11. java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
  12. grunt之filerev、usemin
  13. C++ STL常用容器基本用法汇总
  14. C++求集合的交集差集
  15. Network Policy - 每天5分钟玩转 Docker 容器技术(171)
  16. Windows7下安装、部署Weblogic和发布war项目
  17. matlab练习程序(加权最小二乘)
  18. java内嵌jetty服务器
  19. CPU指令分类
  20. pymysql 数据库操控

热门文章

  1. WEBRTC基本介绍
  2. Operating System-Thread(4) 线程的调度激活机制(Scheduler Activations)
  3. POJ2442:Sequence
  4. 查看,修改,上传monmap命令
  5. 使用root直接安装python3.5.2
  6. oracle--pl/sql变量定义----
  7. js遍历for,forEach, for in,for of
  8. .net开发ActiveX控件
  9. Flask14 渲染问题、API、项目文档
  10. 在虚拟机中的Ubuntu搭建java开发环境