20230217031911_removeMysqlNotMap.cs 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace Business.Migrations
  4. {
  5. public partial class removeMysqlNotMap : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.DropColumn(
  10. name: "bang_id",
  11. table: "srm_pr_main");
  12. migrationBuilder.DropColumn(
  13. name: "bang_id",
  14. table: "srm_po_occupy");
  15. migrationBuilder.DropColumn(
  16. name: "bang_id",
  17. table: "srm_po_main");
  18. migrationBuilder.DropColumn(
  19. name: "bang_id",
  20. table: "srm_po_list");
  21. migrationBuilder.DropColumn(
  22. name: "bang_id",
  23. table: "mes_oorder");
  24. migrationBuilder.DropColumn(
  25. name: "bang_id",
  26. table: "mes_morder");
  27. migrationBuilder.DropColumn(
  28. name: "bang_id",
  29. table: "mes_mooccupy");
  30. migrationBuilder.DropColumn(
  31. name: "bang_id",
  32. table: "mes_moentry");
  33. migrationBuilder.DropColumn(
  34. name: "bang_id",
  35. table: "ic_plan");
  36. migrationBuilder.DropColumn(
  37. name: "bang_id",
  38. table: "ic_item_stock");
  39. migrationBuilder.DropColumn(
  40. name: "mongodb_id",
  41. table: "ic_item_stock");
  42. migrationBuilder.DropColumn(
  43. name: "bang_id",
  44. table: "ic_item_pur");
  45. migrationBuilder.DropColumn(
  46. name: "bang_id",
  47. table: "ic_factory_details");
  48. migrationBuilder.DropColumn(
  49. name: "bang_id",
  50. table: "crm_seorderentry");
  51. migrationBuilder.DropColumn(
  52. name: "bang_id",
  53. table: "crm_seorder");
  54. migrationBuilder.AlterTable(
  55. name: "wms_shipnoticelist",
  56. comment: "发运通知单详情清单",
  57. oldComment: "发货通知单明细表")
  58. .Annotation("MySql:CharSet", "utf8mb4")
  59. .OldAnnotation("MySql:CharSet", "utf8mb4");
  60. migrationBuilder.AlterTable(
  61. name: "wms_shipnotice",
  62. comment: "发运通知单",
  63. oldComment: "发货通知单")
  64. .Annotation("MySql:CharSet", "utf8mb4")
  65. .OldAnnotation("MySql:CharSet", "utf8mb4");
  66. migrationBuilder.AlterTable(
  67. name: "wms_prdprogress",
  68. comment: "进度字典表",
  69. oldComment: "进度字典")
  70. .Annotation("MySql:CharSet", "utf8mb4")
  71. .OldAnnotation("MySql:CharSet", "utf8mb4");
  72. migrationBuilder.AlterTable(
  73. name: "sys_measure_unit",
  74. comment: "计量单位信息表",
  75. oldComment: "计量单位表")
  76. .Annotation("MySql:CharSet", "utf8mb4")
  77. .OldAnnotation("MySql:CharSet", "utf8mb4");
  78. migrationBuilder.AlterTable(
  79. name: "srm_supplier",
  80. comment: "供应商",
  81. oldComment: "供应商表")
  82. .Annotation("MySql:CharSet", "utf8mb4")
  83. .OldAnnotation("MySql:CharSet", "utf8mb4");
  84. migrationBuilder.AlterTable(
  85. name: "sim_issue_type",
  86. comment: "上升时间",
  87. oldComment: "sim事项类别表")
  88. .Annotation("MySql:CharSet", "utf8mb4")
  89. .OldAnnotation("MySql:CharSet", "utf8mb4");
  90. migrationBuilder.AlterTable(
  91. name: "mes_workshop",
  92. comment: "工位表(工作中心)",
  93. oldComment: "工位表")
  94. .Annotation("MySql:CharSet", "utf8mb4")
  95. .OldAnnotation("MySql:CharSet", "utf8mb4");
  96. migrationBuilder.AlterTable(
  97. name: "mes_work_calendar",
  98. comment: "工作日历",
  99. oldComment: "工作日历表")
  100. .Annotation("MySql:CharSet", "utf8mb4")
  101. .OldAnnotation("MySql:CharSet", "utf8mb4");
  102. migrationBuilder.AlterTable(
  103. name: "mes_tech_proc_workshop_icitem",
  104. comment: "发料到工序表",
  105. oldComment: "发料到工位表")
  106. .Annotation("MySql:CharSet", "utf8mb4")
  107. .OldAnnotation("MySql:CharSet", "utf8mb4");
  108. migrationBuilder.AlterTable(
  109. name: "mes_tech_proc_workshop_equipment",
  110. comment: "工序关联设备表",
  111. oldComment: "工艺路径关联设备表")
  112. .Annotation("MySql:CharSet", "utf8mb4")
  113. .OldAnnotation("MySql:CharSet", "utf8mb4");
  114. migrationBuilder.AlterTable(
  115. name: "mes_mereport",
  116. comment: "生产报工记录表",
  117. oldComment: "生产报工记录")
  118. .Annotation("MySql:CharSet", "utf8mb4")
  119. .OldAnnotation("MySql:CharSet", "utf8mb4");
  120. migrationBuilder.AlterTable(
  121. name: "mes_merecheck",
  122. comment: "生产报检记录表",
  123. oldComment: "生产报检记录")
  124. .Annotation("MySql:CharSet", "utf8mb4")
  125. .OldAnnotation("MySql:CharSet", "utf8mb4");
  126. migrationBuilder.AlterTable(
  127. name: "ic_item_inventory",
  128. comment: "物料库存明细表",
  129. oldComment: "物料库存信息表")
  130. .Annotation("MySql:CharSet", "utf8mb4")
  131. .OldAnnotation("MySql:CharSet", "utf8mb4");
  132. migrationBuilder.AlterTable(
  133. name: "crm_seorder",
  134. comment: "销售订单表",
  135. oldComment: "销售订单")
  136. .Annotation("MySql:CharSet", "utf8mb4")
  137. .OldAnnotation("MySql:CharSet", "utf8mb4");
  138. migrationBuilder.AlterTable(
  139. name: "crm_customer",
  140. comment: "客户",
  141. oldComment: "客户表")
  142. .Annotation("MySql:CharSet", "utf8mb4")
  143. .OldAnnotation("MySql:CharSet", "utf8mb4");
  144. migrationBuilder.AddColumn<decimal>(
  145. name: "lqt",
  146. table: "mes_tech_process",
  147. type: "decimal(20,8)",
  148. precision: 20,
  149. scale: 8,
  150. nullable: true,
  151. comment: "前置等待时间");
  152. migrationBuilder.AddColumn<string>(
  153. name: "version",
  154. table: "ic_bom_child",
  155. type: "varchar(80)",
  156. maxLength: 80,
  157. nullable: true,
  158. comment: "版本")
  159. .Annotation("MySql:CharSet", "utf8mb4");
  160. }
  161. protected override void Down(MigrationBuilder migrationBuilder)
  162. {
  163. migrationBuilder.DropColumn(
  164. name: "lqt",
  165. table: "mes_tech_process");
  166. migrationBuilder.DropColumn(
  167. name: "version",
  168. table: "ic_bom_child");
  169. migrationBuilder.AlterTable(
  170. name: "wms_shipnoticelist",
  171. comment: "发货通知单明细表",
  172. oldComment: "发运通知单详情清单")
  173. .Annotation("MySql:CharSet", "utf8mb4")
  174. .OldAnnotation("MySql:CharSet", "utf8mb4");
  175. migrationBuilder.AlterTable(
  176. name: "wms_shipnotice",
  177. comment: "发货通知单",
  178. oldComment: "发运通知单")
  179. .Annotation("MySql:CharSet", "utf8mb4")
  180. .OldAnnotation("MySql:CharSet", "utf8mb4");
  181. migrationBuilder.AlterTable(
  182. name: "wms_prdprogress",
  183. comment: "进度字典",
  184. oldComment: "进度字典表")
  185. .Annotation("MySql:CharSet", "utf8mb4")
  186. .OldAnnotation("MySql:CharSet", "utf8mb4");
  187. migrationBuilder.AlterTable(
  188. name: "sys_measure_unit",
  189. comment: "计量单位表",
  190. oldComment: "计量单位信息表")
  191. .Annotation("MySql:CharSet", "utf8mb4")
  192. .OldAnnotation("MySql:CharSet", "utf8mb4");
  193. migrationBuilder.AlterTable(
  194. name: "srm_supplier",
  195. comment: "供应商表",
  196. oldComment: "供应商")
  197. .Annotation("MySql:CharSet", "utf8mb4")
  198. .OldAnnotation("MySql:CharSet", "utf8mb4");
  199. migrationBuilder.AlterTable(
  200. name: "sim_issue_type",
  201. comment: "sim事项类别表",
  202. oldComment: "上升时间")
  203. .Annotation("MySql:CharSet", "utf8mb4")
  204. .OldAnnotation("MySql:CharSet", "utf8mb4");
  205. migrationBuilder.AlterTable(
  206. name: "mes_workshop",
  207. comment: "工位表",
  208. oldComment: "工位表(工作中心)")
  209. .Annotation("MySql:CharSet", "utf8mb4")
  210. .OldAnnotation("MySql:CharSet", "utf8mb4");
  211. migrationBuilder.AlterTable(
  212. name: "mes_work_calendar",
  213. comment: "工作日历表",
  214. oldComment: "工作日历")
  215. .Annotation("MySql:CharSet", "utf8mb4")
  216. .OldAnnotation("MySql:CharSet", "utf8mb4");
  217. migrationBuilder.AlterTable(
  218. name: "mes_tech_proc_workshop_icitem",
  219. comment: "发料到工位表",
  220. oldComment: "发料到工序表")
  221. .Annotation("MySql:CharSet", "utf8mb4")
  222. .OldAnnotation("MySql:CharSet", "utf8mb4");
  223. migrationBuilder.AlterTable(
  224. name: "mes_tech_proc_workshop_equipment",
  225. comment: "工艺路径关联设备表",
  226. oldComment: "工序关联设备表")
  227. .Annotation("MySql:CharSet", "utf8mb4")
  228. .OldAnnotation("MySql:CharSet", "utf8mb4");
  229. migrationBuilder.AlterTable(
  230. name: "mes_mereport",
  231. comment: "生产报工记录",
  232. oldComment: "生产报工记录表")
  233. .Annotation("MySql:CharSet", "utf8mb4")
  234. .OldAnnotation("MySql:CharSet", "utf8mb4");
  235. migrationBuilder.AlterTable(
  236. name: "mes_merecheck",
  237. comment: "生产报检记录",
  238. oldComment: "生产报检记录表")
  239. .Annotation("MySql:CharSet", "utf8mb4")
  240. .OldAnnotation("MySql:CharSet", "utf8mb4");
  241. migrationBuilder.AlterTable(
  242. name: "ic_item_inventory",
  243. comment: "物料库存信息表",
  244. oldComment: "物料库存明细表")
  245. .Annotation("MySql:CharSet", "utf8mb4")
  246. .OldAnnotation("MySql:CharSet", "utf8mb4");
  247. migrationBuilder.AlterTable(
  248. name: "crm_seorder",
  249. comment: "销售订单",
  250. oldComment: "销售订单表")
  251. .Annotation("MySql:CharSet", "utf8mb4")
  252. .OldAnnotation("MySql:CharSet", "utf8mb4");
  253. migrationBuilder.AlterTable(
  254. name: "crm_customer",
  255. comment: "客户表",
  256. oldComment: "客户")
  257. .Annotation("MySql:CharSet", "utf8mb4")
  258. .OldAnnotation("MySql:CharSet", "utf8mb4");
  259. migrationBuilder.AddColumn<long>(
  260. name: "bang_id",
  261. table: "srm_pr_main",
  262. type: "bigint",
  263. nullable: true,
  264. comment: "计算id");
  265. migrationBuilder.AddColumn<long>(
  266. name: "bang_id",
  267. table: "srm_po_occupy",
  268. type: "bigint",
  269. nullable: true,
  270. comment: "计算id");
  271. migrationBuilder.AddColumn<long>(
  272. name: "bang_id",
  273. table: "srm_po_main",
  274. type: "bigint",
  275. nullable: true,
  276. comment: "计算id");
  277. migrationBuilder.AddColumn<long>(
  278. name: "bang_id",
  279. table: "srm_po_list",
  280. type: "bigint",
  281. nullable: true,
  282. comment: "计算id");
  283. migrationBuilder.AddColumn<long>(
  284. name: "bang_id",
  285. table: "mes_oorder",
  286. type: "bigint",
  287. nullable: true,
  288. comment: "计算id");
  289. migrationBuilder.AddColumn<long>(
  290. name: "bang_id",
  291. table: "mes_morder",
  292. type: "bigint",
  293. nullable: true,
  294. comment: "计算id");
  295. migrationBuilder.AddColumn<long>(
  296. name: "bang_id",
  297. table: "mes_mooccupy",
  298. type: "bigint",
  299. nullable: true,
  300. comment: "计算id");
  301. migrationBuilder.AddColumn<long>(
  302. name: "bang_id",
  303. table: "mes_moentry",
  304. type: "bigint",
  305. nullable: true,
  306. comment: "计算id");
  307. migrationBuilder.AddColumn<long>(
  308. name: "bang_id",
  309. table: "ic_plan",
  310. type: "bigint",
  311. nullable: true,
  312. comment: "计算id");
  313. migrationBuilder.AddColumn<long>(
  314. name: "bang_id",
  315. table: "ic_item_stock",
  316. type: "bigint",
  317. nullable: true,
  318. comment: "计算id");
  319. migrationBuilder.AddColumn<long>(
  320. name: "mongodb_id",
  321. table: "ic_item_stock",
  322. type: "bigint",
  323. nullable: true,
  324. comment: "mongodb主键-用于资源检查快照");
  325. migrationBuilder.AddColumn<long>(
  326. name: "bang_id",
  327. table: "ic_item_pur",
  328. type: "bigint",
  329. nullable: true,
  330. comment: "计算id");
  331. migrationBuilder.AddColumn<long>(
  332. name: "bang_id",
  333. table: "ic_factory_details",
  334. type: "bigint",
  335. nullable: true,
  336. comment: "计算id");
  337. migrationBuilder.AddColumn<long>(
  338. name: "bang_id",
  339. table: "crm_seorderentry",
  340. type: "bigint",
  341. nullable: true,
  342. comment: "计算id");
  343. migrationBuilder.AddColumn<long>(
  344. name: "bang_id",
  345. table: "crm_seorder",
  346. type: "bigint",
  347. nullable: true,
  348. comment: "计算id");
  349. }
  350. }
  351. }