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");
|
}
|
}
|
}
|