namespace Weee.Migrations { using System; using System.Data.Entity.Migrations; public partial class addOrgLCA36Material : DbMigration { public override void Up() { CreateTable( "dbo.OrgLCA36Material", c => new { ID = c.Int(nullable: false, identity: true), LCAID = c.Int(nullable: false), PCS = c.Int(nullable: false), Spec = c.Decimal(nullable: false, precision: 24, scale: 12), SpecConverted = c.Decimal(nullable: false, precision: 24, scale: 12), UnitConverted = c.String(nullable: false, maxLength: 10), ActivityStrength = c.Decimal(nullable: false, precision: 24, scale: 12), Unit = c.String(nullable: false, maxLength: 10), KgCO2e = c.Decimal(nullable: false, precision: 24, scale: 12), UnitDeclared = c.String(nullable: false, maxLength: 10), subTotalKgCO2e = c.Decimal(nullable: false, precision: 24, scale: 12), CreatedTime = c.DateTime(nullable: false, precision: 7, storeType: "datetime2"), Description = c.String(), }) .PrimaryKey(t => t.ID) .ForeignKey("dbo.LCAs", t => t.LCAID, cascadeDelete: true) .Index(t => t.LCAID); } public override void Down() { DropForeignKey("dbo.OrgLCA36Material", "LCAID", "dbo.LCAs"); DropIndex("dbo.OrgLCA36Material", new[] { "LCAID" }); DropTable("dbo.OrgLCA36Material"); } } }