namespace ShwasherSys.Migrations { using System; using System.Collections.Generic; using System.Data.Entity.Infrastructure.Annotations; using System.Data.Entity.Migrations; public partial class addStandardCatelog : DbMigration { public override void Up() { CreateTable( "dbo.StandardCatalog", c => new { Id = c.Int(nullable: false, identity: true), StandardNo = c.String(maxLength: 50), StandardAbbr = c.String(nullable: false, maxLength: 50), StandardAbbrName = c.String(nullable: false, maxLength: 50), StandardName = c.String(nullable: false, maxLength: 150), Rigidity = c.String(maxLength: 250), Param = c.String(maxLength: 250), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.StandardDetail", c => new { Id = c.Int(nullable: false, identity: true), StandardId = c.Int(nullable: false), Specs = c.String(nullable: false, maxLength: 50), StandardName = c.String(nullable: false, maxLength: 150), InnerDiameter1 = c.String(maxLength: 250), InnerDiameter2 = c.String(maxLength: 250), OutDiameter1 = c.String(maxLength: 250), OutDiameter2 = c.String(maxLength: 250), Thickness1 = c.String(maxLength: 250), Thickness2 = c.String(maxLength: 250), Height1 = c.String(maxLength: 250), Height2 = c.String(maxLength: 250), InnerChamfer1 = c.String(maxLength: 250), InnerChamfer2 = c.String(maxLength: 250), OutChamfer1 = c.String(maxLength: 250), OutChamfer2 = c.String(maxLength: 250), ThousandWeigh = c.String(maxLength: 250), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); //DropColumn("dbo.N_ViewScheduleOrderSend", "StockNo"); } public override void Down() { //AddColumn("dbo.N_ViewScheduleOrderSend", "StockNo", c => c.String()); DropTable("dbo.StandardDetail", removedAnnotations: new Dictionary { { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.StandardCatalog", removedAnnotations: new Dictionary { { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); } } }