demo20230512/Migrations/201506020430278_addAbandonedStage.cs

37 lines
1.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 addAbandonedStage : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.ProductLCAAbandonedStage",
c => new
{
ID = c.Int(nullable: false),
WasteWeight = c.Decimal(nullable: false, precision: 24, scale: 12),
RecyclePercentage = c.Decimal(nullable: false, precision: 24, scale: 12),
ReusePercentage = c.Decimal(nullable: false, precision: 24, scale: 12),
RecoverPercentage = c.Decimal(nullable: false, precision: 24, scale: 12),
IncinerationParameter = c.Decimal(nullable: false, precision: 24, scale: 12),
AbandonedParameter = c.Decimal(nullable: false, precision: 24, scale: 12),
Description = c.String(),
})
.PrimaryKey(t => t.ID)
.ForeignKey("dbo.ProductLCA", t => t.ID)
.Index(t => t.ID);
}
public override void Down()
{
DropForeignKey("dbo.ProductLCAAbandonedStage", "ID", "dbo.ProductLCA");
DropIndex("dbo.ProductLCAAbandonedStage", new[] { "ID" });
DropTable("dbo.ProductLCAAbandonedStage");
}
}
}