demo20230512/Migrations/201503120954107_change decimal precision.cs
2023-05-12 10:20:28 +08:00

147 lines
17 KiB
C#

namespace Weee.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class changedecimalprecision : DbMigration
{
public override void Up()
{
AlterColumn("dbo.ProductLCA", "FabProductionWeight", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCA", "FabProductionArea", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCA", "FabProductionHour", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCA", "ProductProductionPcs", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCA", "ProductProductionHour", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCA", "DistributeKgCO2eInWeight", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCA", "DistributeKgCO2eInArea", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCA", "DistributeKgCO2eInWorkHour", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_FireEquipments", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_FireEquipments", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.Parameters", "Value", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_GasolineEquipments", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_GasolineEquipments", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_Kitchens", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_Kitchens", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "Peak", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "HalfPeak", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "SaturdayHalfPeak", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "OffPeak", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_Refrigerants", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_Refrigerants", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_SteamUsages", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_SteamUsages", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_Vehicles", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_Vehicles", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "WorkerNumber", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "WorkDay", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "AverageHourPerDay", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAProductSurveyForm_Materials", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAProductSurveyForm_Materials", "HighLevelAnalyzeResult", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAProductSurveyForm_Materials", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAProductSurveyForm_Materials", "InputParameterValue", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAReplyRequests", "RepliedValue", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_OtherCompounds", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_OtherCompounds", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.PCRs", "Percentage", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.PCRs", "RecyclingParameterValue", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.InventoryStageData", "WattInOperation", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.InventoryStageData", "WattInLowOperation", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.InventoryStageData", "ProductDevStageCarbonFootprint", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.InventoryStageData", "ProductUsageStagePowerFactor", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.InventoryStageData", "ProductAbandonedStageCarbonFootprint", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.Products", "Weight", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.Products", "AreaSize", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.Products", "PcsPerYear", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "TransportDistance", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "TransportQuantity", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "TransportWeight", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "WaterBOD", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "WaterCOD", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "WaterCMD", c => c.Decimal(precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_WasteTransports", "TransportDistance", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_WasteTransports", "TransportWeight", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_WasteTransports", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_WasteTransports", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_WaterUsages", "Scalar", c => c.Decimal(nullable: false, precision: 24, scale: 12));
AlterColumn("dbo.ProductLCAFabSurveyForm_WaterUsages", "KgCO2e", c => c.Decimal(nullable: false, precision: 24, scale: 12));
}
public override void Down()
{
AlterColumn("dbo.ProductLCAFabSurveyForm_WaterUsages", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_WaterUsages", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_WasteTransports", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_WasteTransports", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_WasteTransports", "TransportWeight", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_WasteTransports", "TransportDistance", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "WaterCMD", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "WaterCOD", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Wastes", "WaterBOD", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "TransportWeight", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "TransportQuantity", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_Transports", "TransportDistance", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.Products", "PcsPerYear", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.Products", "AreaSize", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.Products", "Weight", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.InventoryStageData", "ProductAbandonedStageCarbonFootprint", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.InventoryStageData", "ProductUsageStagePowerFactor", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.InventoryStageData", "ProductDevStageCarbonFootprint", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.InventoryStageData", "WattInLowOperation", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.InventoryStageData", "WattInOperation", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.PCRs", "RecyclingParameterValue", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.PCRs", "Percentage", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_OtherCompounds", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAFabSurveyForm_OtherCompounds", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAReplyRequests", "RepliedValue", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAProductSurveyForm_Materials", "InputParameterValue", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAProductSurveyForm_Materials", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAProductSurveyForm_Materials", "HighLevelAnalyzeResult", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCAProductSurveyForm_Materials", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "AverageHourPerDay", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "WorkDay", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_WorkHours", "WorkerNumber", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_Vehicles", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_Vehicles", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_SteamUsages", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_SteamUsages", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_Refrigerants", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_Refrigerants", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "OffPeak", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "SaturdayHalfPeak", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "HalfPeak", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_PowerUsages", "Peak", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_Kitchens", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_Kitchens", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_GasolineEquipments", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_GasolineEquipments", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.Parameters", "Value", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_FireEquipments", "KgCO2e", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.LCACommonSurveyForm_FireEquipments", "Scalar", c => c.Decimal(nullable: false, precision: 18, scale: 6));
AlterColumn("dbo.ProductLCA", "DistributeKgCO2eInWorkHour", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCA", "DistributeKgCO2eInArea", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCA", "DistributeKgCO2eInWeight", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCA", "ProductProductionHour", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCA", "ProductProductionPcs", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCA", "FabProductionHour", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCA", "FabProductionArea", c => c.Decimal(precision: 18, scale: 6));
AlterColumn("dbo.ProductLCA", "FabProductionWeight", c => c.Decimal(precision: 18, scale: 6));
}
}
}