20210928081138_9-28-21.cs 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace WCS.Service.Migrations
  4. {
  5. public partial class _92821 : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.DropTable(
  10. name: "WCS_STATION521");
  11. }
  12. protected override void Down(MigrationBuilder migrationBuilder)
  13. {
  14. migrationBuilder.CreateTable(
  15. name: "WCS_STATION521",
  16. columns: table => new
  17. {
  18. ID = table.Column<int>(type: "int", nullable: false)
  19. .Annotation("SqlServer:Identity", "1, 1"),
  20. BCR_NOREAD = table.Column<bool>(type: "bit", nullable: false),
  21. B_OUTSIDE = table.Column<bool>(type: "bit", nullable: false),
  22. DEVICECODE = table.Column<string>(type: "nvarchar(50)", nullable: true),
  23. ENABLED = table.Column<bool>(type: "bit", nullable: false),
  24. FRAME = table.Column<DateTime>(type: "datetime2", nullable: false),
  25. F_OUTSIDE = table.Column<bool>(type: "bit", nullable: false),
  26. GOODSCODE = table.Column<int>(type: "int", nullable: false),
  27. GOODSEND = table.Column<short>(type: "smallint", nullable: false),
  28. GOODSSIZE = table.Column<short>(type: "smallint", nullable: false),
  29. GOODSSTART = table.Column<short>(type: "smallint", nullable: false),
  30. GOODSTYPE = table.Column<short>(type: "smallint", nullable: false),
  31. GOODS_ERR = table.Column<bool>(type: "bit", nullable: false),
  32. HEIGHT = table.Column<short>(type: "smallint", nullable: false),
  33. H_OUTSIDE = table.Column<bool>(type: "bit", nullable: false),
  34. ISLAST = table.Column<bool>(type: "bit", nullable: false),
  35. L_OUTSIDE = table.Column<bool>(type: "bit", nullable: false),
  36. OVERLOAD = table.Column<bool>(type: "bit", nullable: false),
  37. PH_STATUS = table.Column<bool>(type: "bit", nullable: false),
  38. PH_STATUS2 = table.Column<bool>(type: "bit", nullable: false),
  39. REQUEST = table.Column<bool>(type: "bit", nullable: false),
  40. RES = table.Column<bool>(type: "bit", nullable: false),
  41. RES1 = table.Column<bool>(type: "bit", nullable: false),
  42. RES2 = table.Column<bool>(type: "bit", nullable: false),
  43. RES4 = table.Column<bool>(type: "bit", nullable: false),
  44. RES5 = table.Column<bool>(type: "bit", nullable: false),
  45. R_OUTSIDE = table.Column<bool>(type: "bit", nullable: false),
  46. TASKNUM = table.Column<int>(type: "int", nullable: false),
  47. UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
  48. UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  49. VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true),
  50. WCSVERSION = table.Column<int>(type: "int", nullable: false)
  51. },
  52. constraints: table =>
  53. {
  54. table.PrimaryKey("PK_WCS_STATION521", x => x.ID);
  55. table.ForeignKey(
  56. name: "FK_WCS_STATION521_WCS_DEVICE_DEVICECODE",
  57. column: x => x.DEVICECODE,
  58. principalTable: "WCS_DEVICE",
  59. principalColumn: "CODE",
  60. onDelete: ReferentialAction.Restrict);
  61. });
  62. migrationBuilder.CreateIndex(
  63. name: "IX_WCS_STATION521_DEVICECODE",
  64. table: "WCS_STATION521",
  65. column: "DEVICECODE");
  66. }
  67. }
  68. }