20210928080725_9-28-4.cs 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace WCS.Service.Migrations
  4. {
  5. public partial class _9284 : 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. H_OUTSIDE = table.Column<bool>(type: "bit", nullable: false),
  33. ISLAST = table.Column<bool>(type: "bit", nullable: false),
  34. L_OUTSIDE = table.Column<bool>(type: "bit", nullable: false),
  35. OVERLOAD = table.Column<bool>(type: "bit", nullable: false),
  36. PH_STATUS = table.Column<bool>(type: "bit", nullable: false),
  37. PH_STATUS2 = table.Column<bool>(type: "bit", nullable: false),
  38. REQUEST = table.Column<bool>(type: "bit", nullable: false),
  39. RES = table.Column<bool>(type: "bit", nullable: false),
  40. RES1 = table.Column<bool>(type: "bit", nullable: false),
  41. RES2 = table.Column<bool>(type: "bit", nullable: false),
  42. RES4 = table.Column<bool>(type: "bit", nullable: false),
  43. RES5 = table.Column<bool>(type: "bit", nullable: false),
  44. R_OUTSIDE = table.Column<bool>(type: "bit", nullable: false),
  45. TASKNUM = table.Column<int>(type: "int", nullable: false),
  46. UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
  47. UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  48. VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true),
  49. WCSVERSION = table.Column<int>(type: "int", nullable: false)
  50. },
  51. constraints: table =>
  52. {
  53. table.PrimaryKey("PK_WCS_STATION521", x => x.ID);
  54. table.ForeignKey(
  55. name: "FK_WCS_STATION521_WCS_DEVICE_DEVICECODE",
  56. column: x => x.DEVICECODE,
  57. principalTable: "WCS_DEVICE",
  58. principalColumn: "CODE",
  59. onDelete: ReferentialAction.Restrict);
  60. });
  61. migrationBuilder.CreateIndex(
  62. name: "IX_WCS_STATION521_DEVICECODE",
  63. table: "WCS_STATION521",
  64. column: "DEVICECODE");
  65. }
  66. }
  67. }