songjun
2025-09-15 15e82c0dd4200a332b30e2fcd458ad84e2e3d428
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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");
        }
    }
}