39 lines
2.2 KiB
C#
39 lines
2.2 KiB
C#
namespace Weee.Migrations
|
|
{
|
|
using System;
|
|
using System.Data.Entity.Migrations;
|
|
|
|
public partial class alterTableARnGWP : DbMigration
|
|
{
|
|
public override void Up()
|
|
{
|
|
DropIndex("dbo.AssessmentReportGWP", new[] { "ARversionGuid" });
|
|
AddColumn("dbo.AssessmentReportGWP", "AR4GWP100", c => c.Decimal(nullable: false, precision: 24, scale: 12));
|
|
AddColumn("dbo.AssessmentReportGWP", "AR5GWP100", c => c.Decimal(nullable: false, precision: 24, scale: 12));
|
|
AddColumn("dbo.AssessmentReportGWP", "AR6GWP100", c => c.Decimal(nullable: false, precision: 24, scale: 12));
|
|
AddColumn("dbo.AssessmentReportGWP", "GHGType", c => c.String(nullable: false, unicode: false, maxLength: 10, defaultValue: ""));
|
|
CreateIndex("dbo.AssessmentReportGWP", "GWPtype", name: "IX_GWPtype");
|
|
CreateIndex("dbo.AssessmentReportGWP", "GHGType", name: "IX_GHGType");
|
|
DropColumn("dbo.AssessmentReportGWP", "ARversionGuid");
|
|
DropColumn("dbo.AssessmentReportGWP", "GWP100");
|
|
DropColumn("dbo.AssessmentReportGWP", "IPCCcode");
|
|
//DropColumn("dbo.AssessmentReportGWP", "ARversion");
|
|
}
|
|
|
|
public override void Down()
|
|
{
|
|
DropIndex("dbo.AssessmentReportGWP", new[] { "GWPtype" });
|
|
DropIndex("dbo.AssessmentReportGWP", new[] { "GHGType" });
|
|
AddColumn("dbo.AssessmentReportGWP", "IPCCcode", c => c.String());
|
|
AddColumn("dbo.AssessmentReportGWP", "GWP100", c => c.Decimal(nullable: false, precision: 24, scale: 12));
|
|
AddColumn("dbo.AssessmentReportGWP", "ARversionGuid", c => c.Guid(nullable: false));
|
|
CreateIndex("dbo.AssessmentReportGWP", "ARversionGuid", name: "IX_ARversionGuid");
|
|
//AddColumn("dbo.AssessmentReportGWP", "ARversion", c => c.String(nullable: false, unicode: false, maxLength: 10));
|
|
DropColumn("dbo.AssessmentReportGWP", "GHGType");
|
|
DropColumn("dbo.AssessmentReportGWP", "AR6GWP100");
|
|
DropColumn("dbo.AssessmentReportGWP", "AR5GWP100");
|
|
DropColumn("dbo.AssessmentReportGWP", "AR4GWP100");
|
|
}
|
|
}
|
|
}
|