202301091141462_addStandardCatelog.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. namespace ShwasherSys.Migrations
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data.Entity.Infrastructure.Annotations;
  6. using System.Data.Entity.Migrations;
  7. public partial class addStandardCatelog : DbMigration
  8. {
  9. public override void Up()
  10. {
  11. CreateTable(
  12. "dbo.StandardCatalog",
  13. c => new
  14. {
  15. Id = c.Int(nullable: false, identity: true),
  16. StandardNo = c.String(maxLength: 50),
  17. StandardAbbr = c.String(nullable: false, maxLength: 50),
  18. StandardAbbrName = c.String(nullable: false, maxLength: 50),
  19. StandardName = c.String(nullable: false, maxLength: 150),
  20. Rigidity = c.String(maxLength: 250),
  21. Param = c.String(maxLength: 250),
  22. IsDeleted = c.Boolean(nullable: false),
  23. DeleterUserId = c.Long(),
  24. DeletionTime = c.DateTime(),
  25. LastModificationTime = c.DateTime(),
  26. LastModifierUserId = c.Long(),
  27. CreationTime = c.DateTime(nullable: false),
  28. CreatorUserId = c.Long(),
  29. },
  30. annotations: new Dictionary<string, object>
  31. {
  32. { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  33. })
  34. .PrimaryKey(t => t.Id);
  35. CreateTable(
  36. "dbo.StandardDetail",
  37. c => new
  38. {
  39. Id = c.Int(nullable: false, identity: true),
  40. StandardId = c.Int(nullable: false),
  41. Specs = c.String(nullable: false, maxLength: 50),
  42. StandardName = c.String(nullable: false, maxLength: 150),
  43. InnerDiameter1 = c.String(maxLength: 250),
  44. InnerDiameter2 = c.String(maxLength: 250),
  45. OutDiameter1 = c.String(maxLength: 250),
  46. OutDiameter2 = c.String(maxLength: 250),
  47. Thickness1 = c.String(maxLength: 250),
  48. Thickness2 = c.String(maxLength: 250),
  49. Height1 = c.String(maxLength: 250),
  50. Height2 = c.String(maxLength: 250),
  51. InnerChamfer1 = c.String(maxLength: 250),
  52. InnerChamfer2 = c.String(maxLength: 250),
  53. OutChamfer1 = c.String(maxLength: 250),
  54. OutChamfer2 = c.String(maxLength: 250),
  55. ThousandWeigh = c.String(maxLength: 250),
  56. IsDeleted = c.Boolean(nullable: false),
  57. DeleterUserId = c.Long(),
  58. DeletionTime = c.DateTime(),
  59. LastModificationTime = c.DateTime(),
  60. LastModifierUserId = c.Long(),
  61. CreationTime = c.DateTime(nullable: false),
  62. CreatorUserId = c.Long(),
  63. },
  64. annotations: new Dictionary<string, object>
  65. {
  66. { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  67. })
  68. .PrimaryKey(t => t.Id);
  69. //DropColumn("dbo.N_ViewScheduleOrderSend", "StockNo");
  70. }
  71. public override void Down()
  72. {
  73. //AddColumn("dbo.N_ViewScheduleOrderSend", "StockNo", c => c.String());
  74. DropTable("dbo.StandardDetail",
  75. removedAnnotations: new Dictionary<string, object>
  76. {
  77. { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  78. });
  79. DropTable("dbo.StandardCatalog",
  80. removedAnnotations: new Dictionary<string, object>
  81. {
  82. { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  83. });
  84. }
  85. }
  86. }