20260524094845_AddMemberInventoryDeletedAt.cs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Infrastructure.Migrations.AppDb
  5. {
  6. /// <inheritdoc />
  7. public partial class AddMemberInventoryDeletedAt : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.AlterTable(
  13. name: "MemberApprove",
  14. comment: "회원 알림 및 수신 동의",
  15. oldComment: "ȸ�� ���� �� ���� ����");
  16. migrationBuilder.AlterTable(
  17. name: "Channel",
  18. comment: "채널 정보",
  19. oldComment: "� ����");
  20. migrationBuilder.AddColumn<DateTime>(
  21. name: "DeletedAt",
  22. table: "MemberInventory",
  23. type: "datetime2",
  24. nullable: true,
  25. comment: "사용자 보관함 소프트 삭제 일시. NULL = 보관함 노출");
  26. migrationBuilder.AlterColumn<DateTime>(
  27. name: "ReceiveSMSConsentAt",
  28. table: "MemberApprove",
  29. type: "datetime2",
  30. nullable: true,
  31. comment: "SMS 수신 동의 일시",
  32. oldClrType: typeof(DateTime),
  33. oldType: "datetime2",
  34. oldNullable: true,
  35. oldComment: "SMS ���� ���� �Ͻ�");
  36. migrationBuilder.AlterColumn<DateTime>(
  37. name: "ReceiveNoteConsentAt",
  38. table: "MemberApprove",
  39. type: "datetime2",
  40. nullable: true,
  41. comment: "쪽지 수신 동의 일시",
  42. oldClrType: typeof(DateTime),
  43. oldType: "datetime2",
  44. oldNullable: true,
  45. oldComment: "���� ���� ���� �Ͻ�");
  46. migrationBuilder.AlterColumn<DateTime>(
  47. name: "ReceiveEmailConsentAt",
  48. table: "MemberApprove",
  49. type: "datetime2",
  50. nullable: true,
  51. comment: "E-MAIL 수신 동의 일시",
  52. oldClrType: typeof(DateTime),
  53. oldType: "datetime2",
  54. oldNullable: true,
  55. oldComment: "E-MAIL ���� ���� �Ͻ�");
  56. migrationBuilder.AlterColumn<bool>(
  57. name: "IsReceiveSMS",
  58. table: "MemberApprove",
  59. type: "bit",
  60. nullable: false,
  61. comment: "SMS 수신 여부",
  62. oldClrType: typeof(bool),
  63. oldType: "bit",
  64. oldComment: "SMS ���� ����");
  65. migrationBuilder.AlterColumn<bool>(
  66. name: "IsReceiveNote",
  67. table: "MemberApprove",
  68. type: "bit",
  69. nullable: false,
  70. comment: "쪽지 수신 여부",
  71. oldClrType: typeof(bool),
  72. oldType: "bit",
  73. oldComment: "���� ���� ����");
  74. migrationBuilder.AlterColumn<bool>(
  75. name: "IsReceiveEmail",
  76. table: "MemberApprove",
  77. type: "bit",
  78. nullable: false,
  79. comment: "E-MAIL 수신 여부",
  80. oldClrType: typeof(bool),
  81. oldType: "bit",
  82. oldComment: "E-MAIL ���� ����");
  83. migrationBuilder.AlterColumn<bool>(
  84. name: "IsDisclosureInvest",
  85. table: "MemberApprove",
  86. type: "bit",
  87. nullable: false,
  88. comment: "투자 현황 공개 여부",
  89. oldClrType: typeof(bool),
  90. oldType: "bit",
  91. oldComment: "���� ��Ȳ ���� ����");
  92. migrationBuilder.AlterColumn<DateTime>(
  93. name: "DisclosureInvestConsentAt",
  94. table: "MemberApprove",
  95. type: "datetime2",
  96. nullable: true,
  97. comment: "투자 현황 공개 동의 일시",
  98. oldClrType: typeof(DateTime),
  99. oldType: "datetime2",
  100. oldNullable: true,
  101. oldComment: "���� ��Ȳ ���� ���� �Ͻ�");
  102. migrationBuilder.AlterColumn<int>(
  103. name: "MemberID",
  104. table: "MemberApprove",
  105. type: "int",
  106. nullable: false,
  107. comment: "회원 ID",
  108. oldClrType: typeof(int),
  109. oldType: "int",
  110. oldComment: "ȸ�� ID");
  111. migrationBuilder.AlterColumn<string>(
  112. name: "YouTubeUrl",
  113. table: "Channel",
  114. type: "nvarchar(255)",
  115. maxLength: 255,
  116. nullable: false,
  117. comment: "YouTube 채널 URL",
  118. oldClrType: typeof(string),
  119. oldType: "nvarchar(255)",
  120. oldMaxLength: 255,
  121. oldComment: "YouTube � URL");
  122. migrationBuilder.AlterColumn<DateTime>(
  123. name: "UpdatedAt",
  124. table: "Channel",
  125. type: "datetime2",
  126. nullable: true,
  127. comment: "수정 일시",
  128. oldClrType: typeof(DateTime),
  129. oldType: "datetime2",
  130. oldNullable: true,
  131. oldComment: "���� �Ͻ�");
  132. migrationBuilder.AlterColumn<string>(
  133. name: "SID",
  134. table: "Channel",
  135. type: "nvarchar(24)",
  136. maxLength: 24,
  137. nullable: false,
  138. comment: "채널 ID",
  139. oldClrType: typeof(string),
  140. oldType: "nvarchar(24)",
  141. oldMaxLength: 24,
  142. oldComment: "� ID");
  143. migrationBuilder.AlterColumn<string>(
  144. name: "Name",
  145. table: "Channel",
  146. type: "nvarchar(200)",
  147. maxLength: 200,
  148. nullable: false,
  149. comment: "채널 이름",
  150. oldClrType: typeof(string),
  151. oldType: "nvarchar(200)",
  152. oldMaxLength: 200,
  153. oldComment: "ä�� �̸�");
  154. migrationBuilder.AlterColumn<int>(
  155. name: "MemberID",
  156. table: "Channel",
  157. type: "int",
  158. nullable: false,
  159. comment: "회원 ID",
  160. oldClrType: typeof(int),
  161. oldType: "int",
  162. oldComment: "ȸ�� ID");
  163. migrationBuilder.AlterColumn<bool>(
  164. name: "IsVerified",
  165. table: "Channel",
  166. type: "bit",
  167. nullable: false,
  168. comment: "인증 여부",
  169. oldClrType: typeof(bool),
  170. oldType: "bit",
  171. oldComment: "���� ����");
  172. migrationBuilder.AlterColumn<bool>(
  173. name: "IsActive",
  174. table: "Channel",
  175. type: "bit",
  176. nullable: false,
  177. comment: "활성 여부",
  178. oldClrType: typeof(bool),
  179. oldType: "bit",
  180. oldComment: "Ȱ�� ����");
  181. migrationBuilder.AlterColumn<string>(
  182. name: "Handle",
  183. table: "Channel",
  184. type: "nvarchar(30)",
  185. maxLength: 30,
  186. nullable: true,
  187. comment: "핸들",
  188. oldClrType: typeof(string),
  189. oldType: "nvarchar(30)",
  190. oldMaxLength: 30,
  191. oldNullable: true,
  192. oldComment: "�ڵ�");
  193. migrationBuilder.AlterColumn<DateTime>(
  194. name: "CreatedAt",
  195. table: "Channel",
  196. type: "datetime2",
  197. nullable: false,
  198. comment: "등록 일시",
  199. oldClrType: typeof(DateTime),
  200. oldType: "datetime2",
  201. oldComment: "��� �Ͻ�");
  202. migrationBuilder.CreateIndex(
  203. name: "IX_MemberInventory_MemberID_DeletedAt",
  204. table: "MemberInventory",
  205. columns: new[] { "MemberID", "DeletedAt" });
  206. }
  207. /// <inheritdoc />
  208. protected override void Down(MigrationBuilder migrationBuilder)
  209. {
  210. migrationBuilder.DropIndex(
  211. name: "IX_MemberInventory_MemberID_DeletedAt",
  212. table: "MemberInventory");
  213. migrationBuilder.DropColumn(
  214. name: "DeletedAt",
  215. table: "MemberInventory");
  216. migrationBuilder.AlterTable(
  217. name: "MemberApprove",
  218. comment: "ȸ�� ���� �� ���� ����",
  219. oldComment: "회원 알림 및 수신 동의");
  220. migrationBuilder.AlterTable(
  221. name: "Channel",
  222. comment: "� ����",
  223. oldComment: "채널 정보");
  224. migrationBuilder.AlterColumn<DateTime>(
  225. name: "ReceiveSMSConsentAt",
  226. table: "MemberApprove",
  227. type: "datetime2",
  228. nullable: true,
  229. comment: "SMS ���� ���� �Ͻ�",
  230. oldClrType: typeof(DateTime),
  231. oldType: "datetime2",
  232. oldNullable: true,
  233. oldComment: "SMS 수신 동의 일시");
  234. migrationBuilder.AlterColumn<DateTime>(
  235. name: "ReceiveNoteConsentAt",
  236. table: "MemberApprove",
  237. type: "datetime2",
  238. nullable: true,
  239. comment: "���� ���� ���� �Ͻ�",
  240. oldClrType: typeof(DateTime),
  241. oldType: "datetime2",
  242. oldNullable: true,
  243. oldComment: "쪽지 수신 동의 일시");
  244. migrationBuilder.AlterColumn<DateTime>(
  245. name: "ReceiveEmailConsentAt",
  246. table: "MemberApprove",
  247. type: "datetime2",
  248. nullable: true,
  249. comment: "E-MAIL ���� ���� �Ͻ�",
  250. oldClrType: typeof(DateTime),
  251. oldType: "datetime2",
  252. oldNullable: true,
  253. oldComment: "E-MAIL 수신 동의 일시");
  254. migrationBuilder.AlterColumn<bool>(
  255. name: "IsReceiveSMS",
  256. table: "MemberApprove",
  257. type: "bit",
  258. nullable: false,
  259. comment: "SMS ���� ����",
  260. oldClrType: typeof(bool),
  261. oldType: "bit",
  262. oldComment: "SMS 수신 여부");
  263. migrationBuilder.AlterColumn<bool>(
  264. name: "IsReceiveNote",
  265. table: "MemberApprove",
  266. type: "bit",
  267. nullable: false,
  268. comment: "���� ���� ����",
  269. oldClrType: typeof(bool),
  270. oldType: "bit",
  271. oldComment: "쪽지 수신 여부");
  272. migrationBuilder.AlterColumn<bool>(
  273. name: "IsReceiveEmail",
  274. table: "MemberApprove",
  275. type: "bit",
  276. nullable: false,
  277. comment: "E-MAIL ���� ����",
  278. oldClrType: typeof(bool),
  279. oldType: "bit",
  280. oldComment: "E-MAIL 수신 여부");
  281. migrationBuilder.AlterColumn<bool>(
  282. name: "IsDisclosureInvest",
  283. table: "MemberApprove",
  284. type: "bit",
  285. nullable: false,
  286. comment: "���� ��Ȳ ���� ����",
  287. oldClrType: typeof(bool),
  288. oldType: "bit",
  289. oldComment: "투자 현황 공개 여부");
  290. migrationBuilder.AlterColumn<DateTime>(
  291. name: "DisclosureInvestConsentAt",
  292. table: "MemberApprove",
  293. type: "datetime2",
  294. nullable: true,
  295. comment: "���� ��Ȳ ���� ���� �Ͻ�",
  296. oldClrType: typeof(DateTime),
  297. oldType: "datetime2",
  298. oldNullable: true,
  299. oldComment: "투자 현황 공개 동의 일시");
  300. migrationBuilder.AlterColumn<int>(
  301. name: "MemberID",
  302. table: "MemberApprove",
  303. type: "int",
  304. nullable: false,
  305. comment: "ȸ�� ID",
  306. oldClrType: typeof(int),
  307. oldType: "int",
  308. oldComment: "회원 ID");
  309. migrationBuilder.AlterColumn<string>(
  310. name: "YouTubeUrl",
  311. table: "Channel",
  312. type: "nvarchar(255)",
  313. maxLength: 255,
  314. nullable: false,
  315. comment: "YouTube � URL",
  316. oldClrType: typeof(string),
  317. oldType: "nvarchar(255)",
  318. oldMaxLength: 255,
  319. oldComment: "YouTube 채널 URL");
  320. migrationBuilder.AlterColumn<DateTime>(
  321. name: "UpdatedAt",
  322. table: "Channel",
  323. type: "datetime2",
  324. nullable: true,
  325. comment: "���� �Ͻ�",
  326. oldClrType: typeof(DateTime),
  327. oldType: "datetime2",
  328. oldNullable: true,
  329. oldComment: "수정 일시");
  330. migrationBuilder.AlterColumn<string>(
  331. name: "SID",
  332. table: "Channel",
  333. type: "nvarchar(24)",
  334. maxLength: 24,
  335. nullable: false,
  336. comment: "� ID",
  337. oldClrType: typeof(string),
  338. oldType: "nvarchar(24)",
  339. oldMaxLength: 24,
  340. oldComment: "채널 ID");
  341. migrationBuilder.AlterColumn<string>(
  342. name: "Name",
  343. table: "Channel",
  344. type: "nvarchar(200)",
  345. maxLength: 200,
  346. nullable: false,
  347. comment: "ä�� �̸�",
  348. oldClrType: typeof(string),
  349. oldType: "nvarchar(200)",
  350. oldMaxLength: 200,
  351. oldComment: "채널 이름");
  352. migrationBuilder.AlterColumn<int>(
  353. name: "MemberID",
  354. table: "Channel",
  355. type: "int",
  356. nullable: false,
  357. comment: "ȸ�� ID",
  358. oldClrType: typeof(int),
  359. oldType: "int",
  360. oldComment: "회원 ID");
  361. migrationBuilder.AlterColumn<bool>(
  362. name: "IsVerified",
  363. table: "Channel",
  364. type: "bit",
  365. nullable: false,
  366. comment: "���� ����",
  367. oldClrType: typeof(bool),
  368. oldType: "bit",
  369. oldComment: "인증 여부");
  370. migrationBuilder.AlterColumn<bool>(
  371. name: "IsActive",
  372. table: "Channel",
  373. type: "bit",
  374. nullable: false,
  375. comment: "Ȱ�� ����",
  376. oldClrType: typeof(bool),
  377. oldType: "bit",
  378. oldComment: "활성 여부");
  379. migrationBuilder.AlterColumn<string>(
  380. name: "Handle",
  381. table: "Channel",
  382. type: "nvarchar(30)",
  383. maxLength: 30,
  384. nullable: true,
  385. comment: "�ڵ�",
  386. oldClrType: typeof(string),
  387. oldType: "nvarchar(30)",
  388. oldMaxLength: 30,
  389. oldNullable: true,
  390. oldComment: "핸들");
  391. migrationBuilder.AlterColumn<DateTime>(
  392. name: "CreatedAt",
  393. table: "Channel",
  394. type: "datetime2",
  395. nullable: false,
  396. comment: "��� �Ͻ�",
  397. oldClrType: typeof(DateTime),
  398. oldType: "datetime2",
  399. oldComment: "등록 일시");
  400. }
  401. }
  402. }