20230620015923_addtable20230620.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace Business.Migrations
  4. {
  5. public partial class addtable20230620 : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.AddColumn<string>(
  10. name: "is_days",
  11. table: "srm_purchase",
  12. type: "nvarchar(80)",
  13. maxLength: 80,
  14. nullable: false,
  15. defaultValue: "",
  16. comment: "每周几送货");
  17. migrationBuilder.AddColumn<bool>(
  18. name: "is_week",
  19. table: "srm_purchase",
  20. type: "bit",
  21. nullable: false,
  22. defaultValue: false,
  23. comment: "是否周期合并");
  24. migrationBuilder.AddColumn<string>(
  25. name: "refer_pr_billno",
  26. table: "srm_pr_main",
  27. type: "nvarchar(80)",
  28. maxLength: 80,
  29. nullable: true,
  30. comment: "关联pr单号");
  31. }
  32. protected override void Down(MigrationBuilder migrationBuilder)
  33. {
  34. migrationBuilder.DropColumn(
  35. name: "is_days",
  36. table: "srm_purchase");
  37. migrationBuilder.DropColumn(
  38. name: "is_week",
  39. table: "srm_purchase");
  40. migrationBuilder.DropColumn(
  41. name: "refer_pr_billno",
  42. table: "srm_pr_main");
  43. }
  44. }
  45. }