public partial class _111111 : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.AssetBorrows",
c => new
{
Id = c.Guid(nullable: false),
WFSheetNO = c.String(),
ApplyUserName = c.String(),
ApplyDept = c.String(),
Phone = c.String(),
ApplyDate = c.DateTime(),
BorrowAsset = c.String(),
BorrowReason = c.String(),
IsSure = c.Boolean(nullable: false),
Created = c.DateTime(nullable: false),
})
.PrimaryKey(t => t.Id);
//AddColumn("dbo.Assets", "AssetBorrow\_Id", c => c.Guid());
//AddColumn("dbo.Dispositions", "Property1", c => c.Boolean());
//AlterColumn("dbo.Dispositions", "IsDisposal", c => c.String());
//CreateIndex("dbo.Assets", "AssetBorrow\_Id");
//AddForeignKey("dbo.Assets", "AssetBorrow\_Id", "dbo.AssetBorrows", "Id");
}
public override void Down()
{
// DropForeignKey("dbo.Assets", "AssetBorrow\_Id", "dbo.AssetBorrows");
// DropIndex("dbo.Assets", new\[\] { "AssetBorrow\_Id" });
// AlterColumn("dbo.Dispositions", "IsDisposal", c => c.Boolean());
// DropColumn("dbo.Dispositions", "Property1");
// DropColumn("dbo.Assets", "AssetBorrow\_Id");
DropTable("dbo.AssetBorrows");
}
}
手机扫一扫
移动阅读更方便
你可能感兴趣的文章