namespace ShwasherSys.Migrations { using System; using System.Data.Entity.Migrations; public partial class addOutSourcingMissStore : DbMigration { public override void Up() { CreateTable( "dbo.OutSourcingMissStore", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(nullable: false, maxLength: 11), PlannedQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), MissQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); } public override void Down() { DropForeignKey("dbo.OutSourcingMissStore", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.OutSourcingMissStore", "CreatorUserId", "dbo.Sys_Users"); DropIndex("dbo.OutSourcingMissStore", new[] { "CreatorUserId" }); DropIndex("dbo.OutSourcingMissStore", new[] { "LastModifierUserId" }); DropTable("dbo.OutSourcingMissStore"); } } }