namespace sbcLabSystem.Data.Migrations
|
{
|
using System;
|
using System.Data.Entity.Migrations;
|
|
public partial class addTable_StandAnswer : DbMigration
|
{
|
public override void Up()
|
{
|
CreateTable(
|
"dbo.StandAnswerInfoes",
|
c => new
|
{
|
Id = c.Int(nullable: false, identity: true),
|
ProjectId = c.Int(nullable: false),
|
AnswerData = c.String(),
|
ABO_RhD_FirstPatient = c.Boolean(nullable: false),
|
CrossMatch_W_FirstPatient = c.Boolean(nullable: false),
|
AntibodyScreening_FirstPatient = c.Boolean(nullable: false),
|
AntibodyIdentification_FirstPatient = c.Boolean(nullable: false),
|
CreateDate = c.DateTime(),
|
AdminID = c.Int(nullable: false),
|
UpdateDate = c.DateTime(),
|
IsRead = c.Boolean(nullable: false),
|
ABO_RhD_SecPatient = c.Int(nullable: false),
|
ABO_RhD_ThdPatient = c.Int(nullable: false),
|
CrossMatch_W_SecPatient = c.Int(nullable: false),
|
CrossMatch_W_ThdPatient = c.Int(nullable: false),
|
CrossMatch_Y_FirstPatient = c.Int(nullable: false),
|
CrossMatch_Y_SecPatient = c.Int(nullable: false),
|
CrossMatch_Y_ThdPatient = c.Int(nullable: false),
|
CrossMatch_Z_FirstPatient = c.Int(nullable: false),
|
CrossMatch_Z_SecPatient = c.Int(nullable: false),
|
CrossMatch_Z_ThdPatient = c.Int(nullable: false),
|
AntibodyScreening_SecPatient = c.Int(nullable: false),
|
AntibodyScreening_ThdPatient = c.Int(nullable: false),
|
AntibodyIdentification_SecPatient = c.Int(nullable: false),
|
AntibodyIdentification_ThdPatient = c.Int(nullable: false),
|
QCDistInfoId = c.Int(nullable: false),
|
})
|
.PrimaryKey(t => t.Id)
|
.ForeignKey("dbo.QCDistributions", t => t.QCDistInfoId, cascadeDelete: true)
|
.Index(t => t.QCDistInfoId);
|
|
}
|
|
public override void Down()
|
{
|
DropForeignKey("dbo.StandAnswerInfoes", "QCDistInfoId", "dbo.QCDistributions");
|
DropIndex("dbo.StandAnswerInfoes", new[] { "QCDistInfoId" });
|
DropTable("dbo.StandAnswerInfoes");
|
}
|
}
|
}
|