20210414030202_21041405.cs 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace WCS.Service.Migrations
  4. {
  5. public partial class _21041405 : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.CreateTable(
  10. name: "WCS_BCRDATA",
  11. columns: table => new
  12. {
  13. ID = table.Column<int>(type: "int", nullable: false)
  14. .Annotation("SqlServer:Identity", "1, 1"),
  15. CONTENT = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
  16. ENABLED = table.Column<bool>(type: "bit", nullable: false),
  17. UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  18. UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
  19. VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true)
  20. },
  21. constraints: table =>
  22. {
  23. table.PrimaryKey("PK_WCS_BCRDATA", x => x.ID);
  24. });
  25. migrationBuilder.CreateTable(
  26. name: "WCS_STATIONDATA",
  27. columns: table => new
  28. {
  29. ID = table.Column<int>(type: "int", nullable: false)
  30. .Annotation("SqlServer:Identity", "1, 1"),
  31. TASKNUM = table.Column<int>(type: "int", nullable: false),
  32. GOODSCODE = table.Column<short>(type: "smallint", nullable: false),
  33. GOODSTYPE = table.Column<short>(type: "smallint", nullable: false),
  34. GOODSSIZE = table.Column<short>(type: "smallint", nullable: false),
  35. GOODSSTART = table.Column<short>(type: "smallint", nullable: false),
  36. GOODSEND = table.Column<short>(type: "smallint", nullable: false),
  37. WEIGHT = table.Column<short>(type: "smallint", nullable: false),
  38. FLAGS = table.Column<short>(type: "smallint", nullable: false),
  39. CONFIRM = table.Column<short>(type: "smallint", nullable: false),
  40. ENABLED = table.Column<bool>(type: "bit", nullable: false),
  41. UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  42. UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
  43. VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true)
  44. },
  45. constraints: table =>
  46. {
  47. table.PrimaryKey("PK_WCS_STATIONDATA", x => x.ID);
  48. });
  49. migrationBuilder.CreateTable(
  50. name: "WCS_STATIONSTATUSDATA",
  51. columns: table => new
  52. {
  53. ID = table.Column<int>(type: "int", nullable: false)
  54. .Annotation("SqlServer:Identity", "1, 1"),
  55. Flags = table.Column<int>(type: "int", nullable: false),
  56. ENABLED = table.Column<bool>(type: "bit", nullable: false),
  57. UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  58. UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
  59. VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true)
  60. },
  61. constraints: table =>
  62. {
  63. table.PrimaryKey("PK_WCS_STATIONSTATUSDATA", x => x.ID);
  64. });
  65. }
  66. protected override void Down(MigrationBuilder migrationBuilder)
  67. {
  68. migrationBuilder.DropTable(
  69. name: "WCS_BCRDATA");
  70. migrationBuilder.DropTable(
  71. name: "WCS_STATIONDATA");
  72. migrationBuilder.DropTable(
  73. name: "WCS_STATIONSTATUSDATA");
  74. }
  75. }
  76. }