namespace Weee.Migrations { using System; using System.Data.Entity.Migrations; public partial class addProductInventoryAndModifyProduct : DbMigration { public override void Up() { CreateTable( "dbo.ProductInventoryStageData", c => new { ID = c.Int(nullable: false, identity: true), ProductID = c.Int(nullable: false), WattInOperation = c.Decimal(nullable: false, precision: 24, scale: 12), HourPerDayInOperation = c.Decimal(nullable: false, precision: 24, scale: 12), OperationName = c.String(), UserId = c.String(), }) .PrimaryKey(t => t.ID) .Index(t => t.ID); CreateTable( "dbo.ProductInventoryParameterData", c => new { ID = c.Int(nullable: false, identity: true), ProductID = c.Int(nullable: false), ParameterValue = c.Decimal(nullable: false, precision: 24, scale: 12), ParameterCountry = c.String(), ParameterRegion = c.String(), ParameterUnit = c.String(), ParameterDescription = c.String(), RegionAmount = c.Decimal(nullable: false, defaultValue: 0, precision: 24, scale: 12), UserId = c.String(), }) .PrimaryKey(t => t.ID) .Index(t => t.ID); AddColumn("dbo.Products", "ProductAge", c => c.Decimal(precision: 24, scale: 12)); } public override void Down() { DropTable("dbo.ProductInventoryStageData"); DropTable("dbo.ProductInventoryParameterData"); DropColumn("dbo.Products", "ProductAge"); } } }