demo20230512/Migrations/202205161508120_totalUpTo0516midNight.cs

158 lines
13 KiB
C#
Raw Normal View History

2023-05-12 10:20:28 +08:00
namespace Weee.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class totalUpTo0516midNight : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.LCARiskAssmtSurveyForm_SignificanceAssmtFactor",
c => new
{
ID = c.Int(nullable: false, identity: true),
SignificanceAssmtID = c.Int(nullable: false),
AssmtFactorID = c.Int(nullable: false),
Score = c.Int(nullable: false),
})
.PrimaryKey(t => t.ID)
.ForeignKey("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", t => t.SignificanceAssmtID, cascadeDelete: true)
.Index(t => t.SignificanceAssmtID);
CreateTable(
"dbo.LCARiskAssmtSurveyForm_LifecycleAssmtItem",
c => new
{
ID = c.Int(nullable: false, identity: true),
LifeCycleStage = c.Int(nullable: false),
DisplayNameTW = c.String(nullable: false, maxLength: 200),
DisplayNameCN = c.String(),
DisplayNameEN = c.String(),
})
.PrimaryKey(t => t.ID);
AddColumn("dbo.LCAs", "GradingScore", c => c.Int(nullable: false));
AddColumn("dbo.LCAs", "isBaseYear", c => c.Boolean(nullable: false));
AddColumn("dbo.LCAs", "activityDataTypeWorkHour", c => c.Int(nullable: false));
AddColumn("dbo.LCAs", "emitParaTypeWorkHour", c => c.Int(nullable: false));
AddColumn("dbo.LCAs", "activityDataTypePowerUsage", c => c.Int(nullable: false));
AddColumn("dbo.LCAs", "emitParaTypePowerUsage", c => c.Int(nullable: false));
AddColumn("dbo.LCAs", "activityDataTypeSteamUsage", c => c.Int(nullable: false));
AddColumn("dbo.LCAs", "emitParaTypeSteamUsage", c => c.Int(nullable: false));
AddColumn("dbo.LCAs", "activityDataTypeWaterUsage", c => c.Int(nullable: false));
AddColumn("dbo.LCAs", "emitParaTypeWaterUsage", c => c.Int(nullable: false));
AddColumn("dbo.LCACommonSurveyForm_FireEquipments", "activityDataType", c => c.Int(nullable: false));
AddColumn("dbo.LCACommonSurveyForm_FireEquipments", "emitParaType", c => c.Int(nullable: false));
AddColumn("dbo.Parameters", "CO2Value", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCACommonSurveyForm_GasolineEquipments", "activityDataType", c => c.Int(nullable: false));
AddColumn("dbo.LCACommonSurveyForm_GasolineEquipments", "emitParaType", c => c.Int(nullable: false));
AddColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "TransferStation1", c => c.String());
AddColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "TransferStation1KgCo2", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "TransferStation2", c => c.String());
AddColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "TransferStation2KgCo2", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "LastKgCo2", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemDelivery", "TransportAir", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemDelivery", "TransportTkmair", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemDelivery", "TransportAirCo2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportLand", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportSea", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportAir", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportLand3", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportTkmland", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportTkmsea", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportTkmair", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportTkmland3", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TotalTkmland", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportLandCo2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportSeaCo2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportAirCo2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AddColumn("dbo.LCACommonSurveyForm_Kitchens", "activityDataType", c => c.Int(nullable: false));
AddColumn("dbo.LCACommonSurveyForm_Kitchens", "emitParaType", c => c.Int(nullable: false));
AddColumn("dbo.LCARiskAssmtSurveyForm_LifecycleAssmt", "LifeCycleStage", c => c.Int(nullable: false));
AddColumn("dbo.LCARiskAssmtSurveyForm_LifecycleAssmt", "GHGEvaluateItem", c => c.Int(nullable: false));
AddColumn("dbo.LCACommonSurveyForm_PowerUsages", "Type", c => c.Int(nullable: false));
AddColumn("dbo.LCACommonSurveyForm_Refrigerants", "activityDataType", c => c.Int(nullable: false));
AddColumn("dbo.LCACommonSurveyForm_Refrigerants", "emitParaType", c => c.Int(nullable: false));
AddColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "LifeCycleStage", c => c.Int(nullable: false));
AddColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "Category", c => c.Int(nullable: false));
AddColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "GHGEvaluateItem", c => c.Int(nullable: false));
AddColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "Score", c => c.Int(nullable: false));
AddColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "Significance", c => c.Int(nullable: false));
AddColumn("dbo.LCACommonSurveyForm_SteamUsages", "Factor", c => c.Decimal(precision: 24, scale: 12));
AddColumn("dbo.LCACommonSurveyForm_Vehicles", "activityDataType", c => c.Int(nullable: false));
AddColumn("dbo.LCACommonSurveyForm_Vehicles", "emitParaType", c => c.Int(nullable: false));
AddColumn("dbo.ProductLCAFabSurveyForm_OtherCompounds", "activityDataType", c => c.Int(nullable: false));
AddColumn("dbo.ProductLCAFabSurveyForm_OtherCompounds", "emitParaType", c => c.Int(nullable: false));
AddColumn("dbo.OrganizationLCAFabSurveyForm_OtherCompounds", "activityDataType", c => c.Int(nullable: false));
AddColumn("dbo.OrganizationLCAFabSurveyForm_OtherCompounds", "emitParaType", c => c.Int(nullable: false));
DropColumn("dbo.LCARiskAssmtSurveyForm_LifecycleAssmt", "Phase");
DropColumn("dbo.LCARiskAssmtSurveyForm_LifecycleAssmt", "Item");
}
public override void Down()
{
AddColumn("dbo.LCARiskAssmtSurveyForm_LifecycleAssmt", "Item", c => c.String());
AddColumn("dbo.LCARiskAssmtSurveyForm_LifecycleAssmt", "Phase", c => c.String());
DropForeignKey("dbo.LCARiskAssmtSurveyForm_SignificanceAssmtFactor", "SignificanceAssmtID", "dbo.LCARiskAssmtSurveyForm_SignificanceAssmt");
DropIndex("dbo.LCARiskAssmtSurveyForm_SignificanceAssmtFactor", new[] { "SignificanceAssmtID" });
DropColumn("dbo.OrganizationLCAFabSurveyForm_OtherCompounds", "emitParaType");
DropColumn("dbo.OrganizationLCAFabSurveyForm_OtherCompounds", "activityDataType");
DropColumn("dbo.ProductLCAFabSurveyForm_OtherCompounds", "emitParaType");
DropColumn("dbo.ProductLCAFabSurveyForm_OtherCompounds", "activityDataType");
DropColumn("dbo.LCACommonSurveyForm_Vehicles", "emitParaType");
DropColumn("dbo.LCACommonSurveyForm_Vehicles", "activityDataType");
DropColumn("dbo.LCACommonSurveyForm_SteamUsages", "Factor");
DropColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "Significance");
DropColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "Score");
DropColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "GHGEvaluateItem");
DropColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "Category");
DropColumn("dbo.LCARiskAssmtSurveyForm_SignificanceAssmt", "LifeCycleStage");
DropColumn("dbo.LCACommonSurveyForm_Refrigerants", "emitParaType");
DropColumn("dbo.LCACommonSurveyForm_Refrigerants", "activityDataType");
DropColumn("dbo.LCACommonSurveyForm_PowerUsages", "Type");
DropColumn("dbo.LCARiskAssmtSurveyForm_LifecycleAssmt", "GHGEvaluateItem");
DropColumn("dbo.LCARiskAssmtSurveyForm_LifecycleAssmt", "LifeCycleStage");
DropColumn("dbo.LCACommonSurveyForm_Kitchens", "emitParaType");
DropColumn("dbo.LCACommonSurveyForm_Kitchens", "activityDataType");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportAirCo2e");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportSeaCo2e");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportLandCo2e");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TotalTkmland");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportTkmland3");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportTkmair");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportTkmsea");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportTkmland");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportLand3");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportAir");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportSea");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemPurchase", "TransportLand");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemDelivery", "TransportAirCo2e");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemDelivery", "TransportTkmair");
DropColumn("dbo.LCARiskAssmtSurveyForm_ItemDelivery", "TransportAir");
DropColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "LastKgCo2");
DropColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "TransferStation2KgCo2");
DropColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "TransferStation2");
DropColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "TransferStation1KgCo2");
DropColumn("dbo.LCARiskAssmtSurveyForm_IntlTravel", "TransferStation1");
DropColumn("dbo.LCACommonSurveyForm_GasolineEquipments", "emitParaType");
DropColumn("dbo.LCACommonSurveyForm_GasolineEquipments", "activityDataType");
DropColumn("dbo.Parameters", "CO2Value");
DropColumn("dbo.LCACommonSurveyForm_FireEquipments", "emitParaType");
DropColumn("dbo.LCACommonSurveyForm_FireEquipments", "activityDataType");
DropColumn("dbo.LCAs", "emitParaTypeWaterUsage");
DropColumn("dbo.LCAs", "activityDataTypeWaterUsage");
DropColumn("dbo.LCAs", "emitParaTypeSteamUsage");
DropColumn("dbo.LCAs", "activityDataTypeSteamUsage");
DropColumn("dbo.LCAs", "emitParaTypePowerUsage");
DropColumn("dbo.LCAs", "activityDataTypePowerUsage");
DropColumn("dbo.LCAs", "emitParaTypeWorkHour");
DropColumn("dbo.LCAs", "activityDataTypeWorkHour");
DropColumn("dbo.LCAs", "isBaseYear");
DropColumn("dbo.LCAs", "GradingScore");
DropTable("dbo.LCARiskAssmtSurveyForm_LifecycleAssmtItem");
DropTable("dbo.LCARiskAssmtSurveyForm_SignificanceAssmtFactor");
}
}
}