领胜LDS 键盘AOI检测项目
wells.liu
2020-07-14 ae5cd6f77221dca1307d5a6c0851470e74412ead
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
namespace Bro.M071.Model.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class initDB : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.KeyUnitData",
                c => new
                    {
                        ID = c.String(nullable: false, maxLength: 64),
                        ProductionMeasurementRecordsId = c.String(maxLength: 64),
                        Key = c.String(maxLength: 64),
                        MeasurementItem = c.String(maxLength: 64),
                        ItemValue = c.String(maxLength: 64),
                        IS_DISABLED = c.Int(nullable: false),
                        IS_DELETED = c.Int(nullable: false),
                        CREATE_USER = c.String(maxLength: 64),
                        CREATE_TIME = c.DateTime(nullable: false),
                        UPDATE_USER = c.String(maxLength: 64),
                        UPDATE_TIME = c.DateTime(),
                    })
                .PrimaryKey(t => t.ID);
            
            CreateTable(
                "dbo.MeasurementAndKeyDataRelation",
                c => new
                    {
                        ID = c.String(nullable: false, maxLength: 64),
                        KeyUnitDataId = c.String(maxLength: 64),
                        MeasurementUnitResultId = c.String(maxLength: 64),
                        IS_DISABLED = c.Int(nullable: false),
                        IS_DELETED = c.Int(nullable: false),
                        CREATE_USER = c.String(maxLength: 64),
                        CREATE_TIME = c.DateTime(nullable: false),
                        UPDATE_USER = c.String(maxLength: 64),
                        UPDATE_TIME = c.DateTime(),
                    })
                .PrimaryKey(t => t.ID);
            
            CreateTable(
                "dbo.MeasurementUnitResult",
                c => new
                    {
                        ID = c.String(nullable: false, maxLength: 64),
                        ProductionMeasurementRecordsId = c.String(maxLength: 64),
                        MeasurementName = c.String(maxLength: 64),
                        MeasurementType = c.String(maxLength: 64),
                        MeasurementValue = c.String(maxLength: 64),
                        MeasurementResult = c.String(maxLength: 64),
                        IS_DISABLED = c.Int(nullable: false),
                        IS_DELETED = c.Int(nullable: false),
                        CREATE_USER = c.String(maxLength: 64),
                        CREATE_TIME = c.DateTime(nullable: false),
                        UPDATE_USER = c.String(maxLength: 64),
                        UPDATE_TIME = c.DateTime(),
                    })
                .PrimaryKey(t => t.ID);
            
            CreateTable(
                "dbo.ProductionMeasurementRecords",
                c => new
                    {
                        ID = c.String(nullable: false, maxLength: 64),
                        ProductionCode = c.String(maxLength: 64),
                        ProductionBarcode = c.String(maxLength: 64),
                        ProductionResult = c.String(maxLength: 64),
                        OperationStartTime = c.DateTime(nullable: false),
                        OperationEndTime = c.DateTime(nullable: false),
                        IS_DISABLED = c.Int(nullable: false),
                        IS_DELETED = c.Int(nullable: false),
                        CREATE_USER = c.String(maxLength: 64),
                        CREATE_TIME = c.DateTime(nullable: false),
                        UPDATE_USER = c.String(maxLength: 64),
                        UPDATE_TIME = c.DateTime(),
                    })
                .PrimaryKey(t => t.ID);
            
        }
        
        public override void Down()
        {
            DropTable("dbo.ProductionMeasurementRecords");
            DropTable("dbo.MeasurementUnitResult");
            DropTable("dbo.MeasurementAndKeyDataRelation");
            DropTable("dbo.KeyUnitData");
        }
    }
}