20221103021621_202211031016.cs 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace ProductionLineMonitor.Web.Migrations
  4. {
  5. public partial class _202211031016 : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.DropColumn(
  10. name: "PowerConsumption",
  11. table: "MachineOutPutPerHours");
  12. migrationBuilder.CreateTable(
  13. name: "MachinePowerConsumptions",
  14. columns: table => new
  15. {
  16. Id = table.Column<string>(type: "TEXT", nullable: false),
  17. MachineId = table.Column<string>(type: "TEXT", nullable: true),
  18. DataTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  19. PowerConsumption = table.Column<float>(type: "REAL", nullable: false),
  20. Capacity = table.Column<int>(type: "INTEGER", nullable: false),
  21. CreateTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  22. UpdateTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  23. },
  24. constraints: table =>
  25. {
  26. table.PrimaryKey("PK_MachinePowerConsumptions", x => x.Id);
  27. });
  28. migrationBuilder.CreateTable(
  29. name: "MachineProcessBTs",
  30. columns: table => new
  31. {
  32. Id = table.Column<string>(type: "TEXT", nullable: false),
  33. MachineId = table.Column<string>(type: "TEXT", nullable: true),
  34. No = table.Column<int>(type: "INTEGER", nullable: false),
  35. BTAOI检测NG数 = table.Column<int>(type: "INTEGER", nullable: false),
  36. BTAOI检查成功率 = table.Column<int>(type: "INTEGER", nullable: false),
  37. BT贴附对位NG数 = table.Column<int>(type: "INTEGER", nullable: false),
  38. BT贴附对位成功率 = table.Column<int>(type: "INTEGER", nullable: false),
  39. 生产总数 = table.Column<int>(type: "INTEGER", nullable: false),
  40. CreateTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  41. UpdateTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  42. },
  43. constraints: table =>
  44. {
  45. table.PrimaryKey("PK_MachineProcessBTs", x => x.Id);
  46. });
  47. migrationBuilder.CreateTable(
  48. name: "MachineProcessFOGs",
  49. columns: table => new
  50. {
  51. Id = table.Column<string>(type: "TEXT", nullable: false),
  52. MachineId = table.Column<string>(type: "TEXT", nullable: true),
  53. No = table.Column<int>(type: "INTEGER", nullable: false),
  54. FPC拍照抛料总数 = table.Column<int>(type: "INTEGER", nullable: false),
  55. FPC抛料率 = table.Column<float>(type: "REAL", nullable: false),
  56. FPC抛料总数 = table.Column<int>(type: "INTEGER", nullable: false),
  57. FPC真空抛料总数 = table.Column<int>(type: "INTEGER", nullable: false),
  58. FPC总投入数 = table.Column<int>(type: "INTEGER", nullable: false),
  59. 校正平台FPC拍照抛料数 = table.Column<int>(type: "INTEGER", nullable: false),
  60. 校正平台FPC真空抛料数 = table.Column<int>(type: "INTEGER", nullable: false),
  61. 预压头FPC拍照抛料数 = table.Column<int>(type: "INTEGER", nullable: false),
  62. 预压头FPC真空抛料数 = table.Column<int>(type: "INTEGER", nullable: false),
  63. CreateTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  64. UpdateTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  65. },
  66. constraints: table =>
  67. {
  68. table.PrimaryKey("PK_MachineProcessFOGs", x => x.Id);
  69. });
  70. migrationBuilder.CreateTable(
  71. name: "MachineProcessPSEPDs",
  72. columns: table => new
  73. {
  74. Id = table.Column<string>(type: "TEXT", nullable: false),
  75. MachineId = table.Column<string>(type: "TEXT", nullable: true),
  76. No = table.Column<int>(type: "INTEGER", nullable: false),
  77. EPD二次撕膜数 = table.Column<int>(type: "INTEGER", nullable: false),
  78. EPD撕膜NG数 = table.Column<int>(type: "INTEGER", nullable: false),
  79. EPD撕膜成功率 = table.Column<int>(type: "INTEGER", nullable: false),
  80. EPD撕膜数 = table.Column<int>(type: "INTEGER", nullable: false),
  81. EPD一次撕膜数 = table.Column<int>(type: "INTEGER", nullable: false),
  82. CreateTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  83. UpdateTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  84. },
  85. constraints: table =>
  86. {
  87. table.PrimaryKey("PK_MachineProcessPSEPDs", x => x.Id);
  88. });
  89. migrationBuilder.CreateTable(
  90. name: "MachineProcessPSs",
  91. columns: table => new
  92. {
  93. Id = table.Column<string>(type: "TEXT", nullable: false),
  94. MachineId = table.Column<string>(type: "TEXT", nullable: true),
  95. No = table.Column<int>(type: "INTEGER", nullable: false),
  96. PS本体撕落抛料数 = table.Column<int>(type: "INTEGER", nullable: false),
  97. PS放反抛料数 = table.Column<int>(type: "INTEGER", nullable: false),
  98. PS拍照NG抛料数 = table.Column<int>(type: "INTEGER", nullable: false),
  99. PS生产总数 = table.Column<int>(type: "INTEGER", nullable: false),
  100. PS撕膜NG抛料数 = table.Column<int>(type: "INTEGER", nullable: false),
  101. PS撕膜成功率 = table.Column<int>(type: "INTEGER", nullable: false),
  102. PS撕膜总数 = table.Column<int>(type: "INTEGER", nullable: false),
  103. PS贴附精度NG数 = table.Column<int>(type: "INTEGER", nullable: false),
  104. PS真空异常抛料数 = table.Column<int>(type: "INTEGER", nullable: false),
  105. CreateTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  106. UpdateTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  107. },
  108. constraints: table =>
  109. {
  110. table.PrimaryKey("PK_MachineProcessPSs", x => x.Id);
  111. });
  112. }
  113. protected override void Down(MigrationBuilder migrationBuilder)
  114. {
  115. migrationBuilder.DropTable(
  116. name: "MachinePowerConsumptions");
  117. migrationBuilder.DropTable(
  118. name: "MachineProcessBTs");
  119. migrationBuilder.DropTable(
  120. name: "MachineProcessFOGs");
  121. migrationBuilder.DropTable(
  122. name: "MachineProcessPSEPDs");
  123. migrationBuilder.DropTable(
  124. name: "MachineProcessPSs");
  125. migrationBuilder.AddColumn<float>(
  126. name: "PowerConsumption",
  127. table: "MachineOutPutPerHours",
  128. type: "REAL",
  129. nullable: true);
  130. }
  131. }
  132. }