20210928081336_9-28-22.cs 3.9 KB

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