20210720013404_7-20-2.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace WCS.Service.Migrations
  4. {
  5. public partial class _7202 : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.CreateTable(
  10. name: "WCS_Robot",
  11. columns: table => new
  12. {
  13. ID = table.Column<int>(type: "int", nullable: false)
  14. .Annotation("SqlServer:Identity", "1, 1"),
  15. Mode = table.Column<short>(type: "smallint", nullable: false),
  16. Status = table.Column<short>(type: "smallint", nullable: false),
  17. FinishedTask = table.Column<int>(type: "int", nullable: false),
  18. TaskID = table.Column<int>(type: "int", nullable: false),
  19. Target = table.Column<short>(type: "smallint", nullable: false),
  20. Trigger = table.Column<short>(type: "smallint", nullable: false),
  21. ENABLED = table.Column<bool>(type: "bit", nullable: false),
  22. UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  23. UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
  24. VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true)
  25. },
  26. constraints: table =>
  27. {
  28. table.PrimaryKey("PK_WCS_Robot", x => x.ID);
  29. });
  30. migrationBuilder.CreateTable(
  31. name: "WCS_RobotStation",
  32. columns: table => new
  33. {
  34. ID = table.Column<int>(type: "int", nullable: false)
  35. .Annotation("SqlServer:Identity", "1, 1"),
  36. Qty = table.Column<short>(type: "smallint", nullable: false),
  37. PalletType = table.Column<short>(type: "smallint", nullable: false),
  38. MaxQty = table.Column<short>(type: "smallint", nullable: false),
  39. ENABLED = table.Column<bool>(type: "bit", nullable: false),
  40. UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  41. UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
  42. VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true)
  43. },
  44. constraints: table =>
  45. {
  46. table.PrimaryKey("PK_WCS_RobotStation", x => x.ID);
  47. });
  48. }
  49. protected override void Down(MigrationBuilder migrationBuilder)
  50. {
  51. migrationBuilder.DropTable(
  52. name: "WCS_Robot");
  53. migrationBuilder.DropTable(
  54. name: "WCS_RobotStation");
  55. }
  56. }
  57. }