20210711082052_7-11-1.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. namespace WCS.Service.Migrations
  3. {
  4. public partial class _7111 : Migration
  5. {
  6. protected override void Up(MigrationBuilder migrationBuilder)
  7. {
  8. migrationBuilder.RenameColumn(
  9. name: "RES3",
  10. table: "WCS_STATION521",
  11. newName: "PH_STATUS2");
  12. migrationBuilder.AddColumn<int>(
  13. name: "FLOOR",
  14. table: "WCS_TASK",
  15. type: "int",
  16. nullable: false,
  17. defaultValue: 0);
  18. migrationBuilder.AddColumn<short>(
  19. name: "FULLQTY",
  20. table: "WCS_TASK",
  21. type: "smallint",
  22. nullable: false,
  23. defaultValue: (short)0);
  24. migrationBuilder.AddColumn<short>(
  25. name: "WORKSHOP",
  26. table: "WCS_TASK",
  27. type: "smallint",
  28. nullable: false,
  29. defaultValue: (short)0);
  30. migrationBuilder.AlterColumn<string>(
  31. name: "CONTENT",
  32. table: "WCS_BCR80",
  33. type: "nvarchar(200)",
  34. maxLength: 200,
  35. nullable: true,
  36. oldClrType: typeof(string),
  37. oldType: "nvarchar(20)",
  38. oldMaxLength: 20,
  39. oldNullable: true);
  40. }
  41. protected override void Down(MigrationBuilder migrationBuilder)
  42. {
  43. migrationBuilder.DropColumn(
  44. name: "FLOOR",
  45. table: "WCS_TASK");
  46. migrationBuilder.DropColumn(
  47. name: "FULLQTY",
  48. table: "WCS_TASK");
  49. migrationBuilder.DropColumn(
  50. name: "WORKSHOP",
  51. table: "WCS_TASK");
  52. migrationBuilder.RenameColumn(
  53. name: "PH_STATUS2",
  54. table: "WCS_STATION521",
  55. newName: "RES3");
  56. migrationBuilder.AlterColumn<string>(
  57. name: "CONTENT",
  58. table: "WCS_BCR80",
  59. type: "nvarchar(20)",
  60. maxLength: 20,
  61. nullable: true,
  62. oldClrType: typeof(string),
  63. oldType: "nvarchar(200)",
  64. oldMaxLength: 200,
  65. oldNullable: true);
  66. }
  67. }
  68. }