202301010903570_add-ScheduleOrderSend.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. namespace ShwasherSys.Migrations
  2. {
  3. using System;
  4. using System.Data.Entity.Migrations;
  5. public partial class addScheduleOrderSend : DbMigration
  6. {
  7. public override void Up()
  8. {
  9. CreateTable(
  10. "dbo.ScheduleOrderSend",
  11. c => new
  12. {
  13. Id = c.Int(nullable: false, identity: true),
  14. OrderItemId = c.Int(nullable: false),
  15. Remark = c.String(maxLength: 500),
  16. PlanQuantity = c.Decimal(precision: 18, scale: 2),
  17. SendUser = c.String(maxLength: 32),
  18. PlanDate = c.DateTime(),
  19. SendState = c.Int(nullable: false),
  20. LastModificationTime = c.DateTime(),
  21. LastModifierUserId = c.Long(),
  22. CreationTime = c.DateTime(nullable: false),
  23. CreatorUserId = c.Long(),
  24. })
  25. .PrimaryKey(t => t.Id);
  26. //CreateTable(
  27. // "dbo.N_ViewScheduleOrderSend",
  28. // c => new
  29. // {
  30. // Id = c.Int(nullable: false, identity: true),
  31. // OrderItemId = c.Int(nullable: false),
  32. // PlanQuantity = c.Decimal(precision: 18, scale: 2),
  33. // SendUser = c.String(),
  34. // Remark = c.String(),
  35. // PlanDate = c.DateTime(),
  36. // SendState = c.Int(nullable: false),
  37. // OrderNo = c.String(),
  38. // ProductNo = c.String(),
  39. // ProductName = c.String(),
  40. // Model = c.String(),
  41. // Material = c.String(),
  42. // SurfaceColor = c.String(),
  43. // Rigidity = c.String(),
  44. // StockNo = c.String(),
  45. // CustomerName = c.String(),
  46. // CustomerId = c.String(),
  47. // })
  48. // .PrimaryKey(t => t.Id);
  49. //AlterColumn("dbo.ReturnGoodOrder", "Quantity", c => c.Decimal(precision: 18, scale: 3));
  50. }
  51. public override void Down()
  52. {
  53. AlterColumn("dbo.ReturnGoodOrder", "Quantity", c => c.Decimal(precision: 18, scale: 2));
  54. DropTable("dbo.N_ViewScheduleOrderSend");
  55. DropTable("dbo.ScheduleOrderSend");
  56. }
  57. }
  58. }