demo20230512/Migrations/201503310337275_addSnapShotOnPorductLCA.cs

47 lines
2.4 KiB
C#
Raw Permalink Normal View History

2023-05-12 10:20:28 +08:00
namespace Weee.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class addSnapShotOnPorductLCA : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.ProductLCAFabSurveyResult",
c => new
{
ID = c.Int(nullable: false),
CreateDate = c.DateTime(nullable: false, precision: 7, storeType: "datetime2"),
Scope1FabResult = c.Decimal(nullable: false, precision: 24, scale: 12),
Scope2FabResult = c.Decimal(nullable: false, precision: 24, scale: 12),
Scope3FabResult = c.Decimal(nullable: false, precision: 24, scale: 12),
SecondaryWasteResult = c.Decimal(nullable: false, precision: 24, scale: 12),
SecondaryWasteTransportResult = c.Decimal(nullable: false, precision: 24, scale: 12),
SecondaryDirectMaterialResult = c.Decimal(nullable: false, precision: 24, scale: 12),
SecondaryIndirectMaterialResult = c.Decimal(nullable: false, precision: 24, scale: 12),
SecondaryWrapMaterialResult = c.Decimal(nullable: false, precision: 24, scale: 12),
SecondaryTransportResult = c.Decimal(nullable: false, precision: 24, scale: 12),
SnapShotFabProductionWeight = c.Decimal(precision: 24, scale: 12),
SnapShotFabProductionArea = c.Decimal(precision: 24, scale: 12),
SnapShotFabProductionHour = c.Decimal(precision: 24, scale: 12),
SnapShotProductProductionHour = c.Decimal(precision: 24, scale: 12),
SnapShotProductWeight = c.Decimal(precision: 24, scale: 12),
SnapShotProductAreaSize = c.Decimal(precision: 24, scale: 12),
SnapShotProductProductionPcs = c.Decimal(precision: 24, scale: 12),
})
.PrimaryKey(t => t.ID)
.ForeignKey("dbo.ProductLCA", t => t.ID)
.Index(t => t.ID);
}
public override void Down()
{
DropForeignKey("dbo.ProductLCAFabSurveyResult", "ID", "dbo.ProductLCA");
DropIndex("dbo.ProductLCAFabSurveyResult", new[] { "ID" });
DropTable("dbo.ProductLCAFabSurveyResult");
}
}
}