demo20230512/Migrations/202302011115507_addColumnsProductReplyRequest.cs
2023-05-12 10:20:28 +08:00

35 lines
1.9 KiB
C#

namespace Weee.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class addColumnsProductReplyRequest : DbMigration
{
public override void Up()
{
AddColumn("dbo.ProductLCAReplyRequests", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.ProductLCAReplyRequests", "KgCO2eUnit", c => c.String(nullable: false));
AddColumn("dbo.ProductLCAReplyRequests", "FunctionUnit", c => c.String(nullable: false));
AddColumn("dbo.ProductLCAReplyRequests", "ReportFile", c => c.String(unicode:false, maxLength:999, nullable:true));
AddColumn("dbo.ProductLCAReplyRequests", "ReferenceFile", c => c.String(unicode: false, maxLength: 999, nullable: true));
AddColumn("dbo.ProductLCAReplyRequests", "tCO2e", c => c.Decimal(precision: 24, scale: 12));
AddColumn("dbo.ProductLCAReplyRequests", "YearlyRevenue", c => c.Decimal(precision: 24, scale: 12));
AddColumn("dbo.ProductLCAReplyRequests", "TotalAmount", c => c.Decimal(precision: 24, scale: 12));
AddColumn("dbo.ProductLCAReplyRequests", "TotalQuantity", c => c.Decimal(precision: 24, scale: 12));
}
public override void Down()
{
DropColumn("dbo.ProductLCAReplyRequests", "TotalQuantity");
DropColumn("dbo.ProductLCAReplyRequests", "TotalAmount");
DropColumn("dbo.ProductLCAReplyRequests", "YearlyRevenue");
DropColumn("dbo.ProductLCAReplyRequests", "tCO2e");
DropColumn("dbo.ProductLCAReplyRequests", "ReferenceFile");
DropColumn("dbo.ProductLCAReplyRequests", "ReportFile");
DropColumn("dbo.ProductLCAReplyRequests", "FunctionUnit");
DropColumn("dbo.ProductLCAReplyRequests", "KgCO2eUnit");
DropColumn("dbo.ProductLCAReplyRequests", "KgCO2e");
}
}
}