20220406090851_7.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace WCS.Service.Migrations
  5. {
  6. public partial class _7 : Migration
  7. {
  8. protected override void Up(MigrationBuilder migrationBuilder)
  9. {
  10. migrationBuilder.AlterColumn<byte[]>(
  11. name: "USER_TEXT",
  12. table: "WCS_Users",
  13. type: "varbinary(max)",
  14. nullable: true,
  15. oldClrType: typeof(byte[]),
  16. oldType: "varbinary(max)");
  17. migrationBuilder.AlterColumn<string>(
  18. name: "TaskGroupKey",
  19. table: "WCS_TASK",
  20. type: "nvarchar(max)",
  21. nullable: true,
  22. oldClrType: typeof(string),
  23. oldType: "nvarchar(max)");
  24. migrationBuilder.AlterColumn<string>(
  25. name: "TUNNEL",
  26. table: "WCS_TASK",
  27. type: "nvarchar(10)",
  28. maxLength: 10,
  29. nullable: true,
  30. oldClrType: typeof(string),
  31. oldType: "nvarchar(10)",
  32. oldMaxLength: 10);
  33. migrationBuilder.AlterColumn<string>(
  34. name: "SCSTATION",
  35. table: "WCS_TASK",
  36. type: "nvarchar(20)",
  37. maxLength: 20,
  38. nullable: true,
  39. oldClrType: typeof(string),
  40. oldType: "nvarchar(20)",
  41. oldMaxLength: 20);
  42. migrationBuilder.AlterColumn<string>(
  43. name: "DEVICE",
  44. table: "WCS_TASK",
  45. type: "nvarchar(20)",
  46. maxLength: 20,
  47. nullable: true,
  48. oldClrType: typeof(string),
  49. oldType: "nvarchar(20)",
  50. oldMaxLength: 20);
  51. migrationBuilder.AlterColumn<string>(
  52. name: "BARCODE",
  53. table: "WCS_TASK",
  54. type: "nvarchar(50)",
  55. maxLength: 50,
  56. nullable: true,
  57. oldClrType: typeof(string),
  58. oldType: "nvarchar(50)",
  59. oldMaxLength: 50);
  60. migrationBuilder.AlterColumn<string>(
  61. name: "ADDRTO",
  62. table: "WCS_TASK",
  63. type: "nvarchar(20)",
  64. maxLength: 20,
  65. nullable: true,
  66. oldClrType: typeof(string),
  67. oldType: "nvarchar(20)",
  68. oldMaxLength: 20);
  69. migrationBuilder.AlterColumn<string>(
  70. name: "ADDRNEXT",
  71. table: "WCS_TASK",
  72. type: "nvarchar(20)",
  73. maxLength: 20,
  74. nullable: true,
  75. oldClrType: typeof(string),
  76. oldType: "nvarchar(20)",
  77. oldMaxLength: 20);
  78. migrationBuilder.AlterColumn<string>(
  79. name: "ADDRFROM",
  80. table: "WCS_TASK",
  81. type: "nvarchar(20)",
  82. maxLength: 20,
  83. nullable: true,
  84. oldClrType: typeof(string),
  85. oldType: "nvarchar(20)",
  86. oldMaxLength: 20);
  87. migrationBuilder.AlterColumn<string>(
  88. name: "TUNNEL",
  89. table: "WCS_SystemConfig",
  90. type: "nvarchar(max)",
  91. nullable: true,
  92. oldClrType: typeof(string),
  93. oldType: "nvarchar(max)");
  94. migrationBuilder.AlterColumn<string>(
  95. name: "Direction",
  96. table: "WCS_SystemConfig",
  97. type: "nvarchar(max)",
  98. nullable: true,
  99. oldClrType: typeof(string),
  100. oldType: "nvarchar(max)");
  101. migrationBuilder.AlterColumn<string>(
  102. name: "Describe",
  103. table: "WCS_SystemConfig",
  104. type: "nvarchar(max)",
  105. nullable: true,
  106. oldClrType: typeof(string),
  107. oldType: "nvarchar(max)");
  108. migrationBuilder.AlterColumn<string>(
  109. name: "DEVICECODE",
  110. table: "WCS_SystemConfig",
  111. type: "nvarchar(max)",
  112. nullable: true,
  113. oldClrType: typeof(string),
  114. oldType: "nvarchar(max)");
  115. migrationBuilder.AlterColumn<string>(
  116. name: "Code",
  117. table: "WCS_SystemConfig",
  118. type: "nvarchar(max)",
  119. nullable: true,
  120. oldClrType: typeof(string),
  121. oldType: "nvarchar(max)");
  122. migrationBuilder.AlterColumn<string>(
  123. name: "Node",
  124. table: "WCS_StatusLog",
  125. type: "nvarchar(max)",
  126. nullable: true,
  127. oldClrType: typeof(string),
  128. oldType: "nvarchar(max)");
  129. migrationBuilder.AddColumn<string>(
  130. name: "msg",
  131. table: "WCS_StatusLog",
  132. type: "nvarchar(max)",
  133. nullable: true);
  134. migrationBuilder.AddColumn<string>(
  135. name: "DEVICE",
  136. table: "WCS_EXCEPTION",
  137. type: "nvarchar(1000)",
  138. maxLength: 1000,
  139. nullable: true);
  140. migrationBuilder.AddColumn<string>(
  141. name: "EXCEPTIONTYPE",
  142. table: "WCS_EXCEPTION",
  143. type: "nvarchar(1000)",
  144. maxLength: 1000,
  145. nullable: true);
  146. migrationBuilder.AlterColumn<string>(
  147. name: "Content",
  148. table: "WCS_BCR80",
  149. type: "nvarchar(130)",
  150. maxLength: 130,
  151. nullable: true,
  152. oldClrType: typeof(string),
  153. oldType: "nvarchar(130)",
  154. oldMaxLength: 130);
  155. migrationBuilder.AlterColumn<string>(
  156. name: "Station",
  157. table: "WCS_AGVTask",
  158. type: "nvarchar(20)",
  159. maxLength: 20,
  160. nullable: true,
  161. oldClrType: typeof(string),
  162. oldType: "nvarchar(20)",
  163. oldMaxLength: 20);
  164. migrationBuilder.AlterColumn<string>(
  165. name: "AGVID",
  166. table: "WCS_AGVTask",
  167. type: "nvarchar(20)",
  168. maxLength: 20,
  169. nullable: true,
  170. oldClrType: typeof(string),
  171. oldType: "nvarchar(20)",
  172. oldMaxLength: 20);
  173. }
  174. protected override void Down(MigrationBuilder migrationBuilder)
  175. {
  176. migrationBuilder.DropColumn(
  177. name: "msg",
  178. table: "WCS_StatusLog");
  179. migrationBuilder.DropColumn(
  180. name: "DEVICE",
  181. table: "WCS_EXCEPTION");
  182. migrationBuilder.DropColumn(
  183. name: "EXCEPTIONTYPE",
  184. table: "WCS_EXCEPTION");
  185. migrationBuilder.AlterColumn<byte[]>(
  186. name: "USER_TEXT",
  187. table: "WCS_Users",
  188. type: "varbinary(max)",
  189. nullable: false,
  190. defaultValue: new byte[0],
  191. oldClrType: typeof(byte[]),
  192. oldType: "varbinary(max)",
  193. oldNullable: true);
  194. migrationBuilder.AlterColumn<string>(
  195. name: "TaskGroupKey",
  196. table: "WCS_TASK",
  197. type: "nvarchar(max)",
  198. nullable: false,
  199. defaultValue: "",
  200. oldClrType: typeof(string),
  201. oldType: "nvarchar(max)",
  202. oldNullable: true);
  203. migrationBuilder.AlterColumn<string>(
  204. name: "TUNNEL",
  205. table: "WCS_TASK",
  206. type: "nvarchar(10)",
  207. maxLength: 10,
  208. nullable: false,
  209. defaultValue: "",
  210. oldClrType: typeof(string),
  211. oldType: "nvarchar(10)",
  212. oldMaxLength: 10,
  213. oldNullable: true);
  214. migrationBuilder.AlterColumn<string>(
  215. name: "SCSTATION",
  216. table: "WCS_TASK",
  217. type: "nvarchar(20)",
  218. maxLength: 20,
  219. nullable: false,
  220. defaultValue: "",
  221. oldClrType: typeof(string),
  222. oldType: "nvarchar(20)",
  223. oldMaxLength: 20,
  224. oldNullable: true);
  225. migrationBuilder.AlterColumn<string>(
  226. name: "DEVICE",
  227. table: "WCS_TASK",
  228. type: "nvarchar(20)",
  229. maxLength: 20,
  230. nullable: false,
  231. defaultValue: "",
  232. oldClrType: typeof(string),
  233. oldType: "nvarchar(20)",
  234. oldMaxLength: 20,
  235. oldNullable: true);
  236. migrationBuilder.AlterColumn<string>(
  237. name: "BARCODE",
  238. table: "WCS_TASK",
  239. type: "nvarchar(50)",
  240. maxLength: 50,
  241. nullable: false,
  242. defaultValue: "",
  243. oldClrType: typeof(string),
  244. oldType: "nvarchar(50)",
  245. oldMaxLength: 50,
  246. oldNullable: true);
  247. migrationBuilder.AlterColumn<string>(
  248. name: "ADDRTO",
  249. table: "WCS_TASK",
  250. type: "nvarchar(20)",
  251. maxLength: 20,
  252. nullable: false,
  253. defaultValue: "",
  254. oldClrType: typeof(string),
  255. oldType: "nvarchar(20)",
  256. oldMaxLength: 20,
  257. oldNullable: true);
  258. migrationBuilder.AlterColumn<string>(
  259. name: "ADDRNEXT",
  260. table: "WCS_TASK",
  261. type: "nvarchar(20)",
  262. maxLength: 20,
  263. nullable: false,
  264. defaultValue: "",
  265. oldClrType: typeof(string),
  266. oldType: "nvarchar(20)",
  267. oldMaxLength: 20,
  268. oldNullable: true);
  269. migrationBuilder.AlterColumn<string>(
  270. name: "ADDRFROM",
  271. table: "WCS_TASK",
  272. type: "nvarchar(20)",
  273. maxLength: 20,
  274. nullable: false,
  275. defaultValue: "",
  276. oldClrType: typeof(string),
  277. oldType: "nvarchar(20)",
  278. oldMaxLength: 20,
  279. oldNullable: true);
  280. migrationBuilder.AlterColumn<string>(
  281. name: "TUNNEL",
  282. table: "WCS_SystemConfig",
  283. type: "nvarchar(max)",
  284. nullable: false,
  285. defaultValue: "",
  286. oldClrType: typeof(string),
  287. oldType: "nvarchar(max)",
  288. oldNullable: true);
  289. migrationBuilder.AlterColumn<string>(
  290. name: "Direction",
  291. table: "WCS_SystemConfig",
  292. type: "nvarchar(max)",
  293. nullable: false,
  294. defaultValue: "",
  295. oldClrType: typeof(string),
  296. oldType: "nvarchar(max)",
  297. oldNullable: true);
  298. migrationBuilder.AlterColumn<string>(
  299. name: "Describe",
  300. table: "WCS_SystemConfig",
  301. type: "nvarchar(max)",
  302. nullable: false,
  303. defaultValue: "",
  304. oldClrType: typeof(string),
  305. oldType: "nvarchar(max)",
  306. oldNullable: true);
  307. migrationBuilder.AlterColumn<string>(
  308. name: "DEVICECODE",
  309. table: "WCS_SystemConfig",
  310. type: "nvarchar(max)",
  311. nullable: false,
  312. defaultValue: "",
  313. oldClrType: typeof(string),
  314. oldType: "nvarchar(max)",
  315. oldNullable: true);
  316. migrationBuilder.AlterColumn<string>(
  317. name: "Code",
  318. table: "WCS_SystemConfig",
  319. type: "nvarchar(max)",
  320. nullable: false,
  321. defaultValue: "",
  322. oldClrType: typeof(string),
  323. oldType: "nvarchar(max)",
  324. oldNullable: true);
  325. migrationBuilder.AlterColumn<string>(
  326. name: "Node",
  327. table: "WCS_StatusLog",
  328. type: "nvarchar(max)",
  329. nullable: false,
  330. defaultValue: "",
  331. oldClrType: typeof(string),
  332. oldType: "nvarchar(max)",
  333. oldNullable: true);
  334. migrationBuilder.AlterColumn<string>(
  335. name: "Content",
  336. table: "WCS_BCR80",
  337. type: "nvarchar(130)",
  338. maxLength: 130,
  339. nullable: false,
  340. defaultValue: "",
  341. oldClrType: typeof(string),
  342. oldType: "nvarchar(130)",
  343. oldMaxLength: 130,
  344. oldNullable: true);
  345. migrationBuilder.AlterColumn<string>(
  346. name: "Station",
  347. table: "WCS_AGVTask",
  348. type: "nvarchar(20)",
  349. maxLength: 20,
  350. nullable: false,
  351. defaultValue: "",
  352. oldClrType: typeof(string),
  353. oldType: "nvarchar(20)",
  354. oldMaxLength: 20,
  355. oldNullable: true);
  356. migrationBuilder.AlterColumn<string>(
  357. name: "AGVID",
  358. table: "WCS_AGVTask",
  359. type: "nvarchar(20)",
  360. maxLength: 20,
  361. nullable: false,
  362. defaultValue: "",
  363. oldClrType: typeof(string),
  364. oldType: "nvarchar(20)",
  365. oldMaxLength: 20,
  366. oldNullable: true);
  367. }
  368. }
  369. }