20260711162422_AddDataCollectionConfigAndOAuthKeys.cs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace Infrastructure.Migrations.AppDb
  4. {
  5. /// <inheritdoc />
  6. public partial class AddDataCollectionConfigAndOAuthKeys : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.AddColumn<string>(
  12. name: "DataCollection_DataGoKrServiceKeyEnc",
  13. table: "Config",
  14. type: "nvarchar(max)",
  15. nullable: true,
  16. comment: "금융위 data.go.kr ServiceKey (암호화)");
  17. migrationBuilder.AddColumn<string>(
  18. name: "DataCollection_KoreaEximExchangeKeyEnc",
  19. table: "Config",
  20. type: "nvarchar(max)",
  21. nullable: true,
  22. comment: "수출입은행 환율(AP01) authkey (암호화)");
  23. migrationBuilder.AddColumn<string>(
  24. name: "DataCollection_KoreaEximIntlRateKeyEnc",
  25. table: "Config",
  26. type: "nvarchar(max)",
  27. nullable: true,
  28. comment: "수출입은행 국제금리(AP03) authkey (암호화)");
  29. migrationBuilder.AddColumn<string>(
  30. name: "DataCollection_KoreaEximLoanRateKeyEnc",
  31. table: "Config",
  32. type: "nvarchar(max)",
  33. nullable: true,
  34. comment: "수출입은행 대출금리(AP02) authkey (암호화)");
  35. migrationBuilder.AddColumn<bool>(
  36. name: "DataCollection_KoreaEximMacroSync",
  37. table: "Config",
  38. type: "bit",
  39. nullable: false,
  40. defaultValue: false,
  41. comment: "수출입은행 거시·환율 수집");
  42. migrationBuilder.AddColumn<string>(
  43. name: "DataCollection_KosisApiKeyEnc",
  44. table: "Config",
  45. type: "nvarchar(max)",
  46. nullable: true,
  47. comment: "KOSIS apiKey (암호화)");
  48. migrationBuilder.AddColumn<bool>(
  49. name: "DataCollection_KosisSync",
  50. table: "Config",
  51. type: "bit",
  52. nullable: false,
  53. defaultValue: false,
  54. comment: "KOSIS 거시지표 수집");
  55. migrationBuilder.AddColumn<string>(
  56. name: "DataCollection_KrxApiKeyEnc",
  57. table: "Config",
  58. type: "nvarchar(max)",
  59. nullable: true,
  60. comment: "KRX AUTH_KEY (암호화)");
  61. migrationBuilder.AddColumn<bool>(
  62. name: "DataCollection_KrxBondIndexSync",
  63. table: "Config",
  64. type: "bit",
  65. nullable: false,
  66. defaultValue: false,
  67. comment: "KRX 채권지수 수집");
  68. migrationBuilder.AddColumn<bool>(
  69. name: "DataCollection_KrxBondSync",
  70. table: "Config",
  71. type: "bit",
  72. nullable: false,
  73. defaultValue: false,
  74. comment: "KRX 채권 일별매매 수집");
  75. migrationBuilder.AddColumn<bool>(
  76. name: "DataCollection_KrxCommoditySync",
  77. table: "Config",
  78. type: "bit",
  79. nullable: false,
  80. defaultValue: false,
  81. comment: "KRX 일반상품 수집");
  82. migrationBuilder.AddColumn<bool>(
  83. name: "DataCollection_KrxDerivativeSync",
  84. table: "Config",
  85. type: "bit",
  86. nullable: false,
  87. defaultValue: false,
  88. comment: "KRX 파생상품 수집");
  89. migrationBuilder.AddColumn<bool>(
  90. name: "DataCollection_KrxEsgSync",
  91. table: "Config",
  92. type: "bit",
  93. nullable: false,
  94. defaultValue: false,
  95. comment: "KRX ESG 수집");
  96. migrationBuilder.AddColumn<bool>(
  97. name: "DataCollection_KrxEtpSync",
  98. table: "Config",
  99. type: "bit",
  100. nullable: false,
  101. defaultValue: false,
  102. comment: "KRX 증권상품(ETF/ETN/ELW) 수집");
  103. migrationBuilder.AddColumn<bool>(
  104. name: "DataCollection_KrxIndexSync",
  105. table: "Config",
  106. type: "bit",
  107. nullable: false,
  108. defaultValue: false,
  109. comment: "KRX 지수 수집");
  110. migrationBuilder.AddColumn<bool>(
  111. name: "DataCollection_KrxStockSync",
  112. table: "Config",
  113. type: "bit",
  114. nullable: false,
  115. defaultValue: false,
  116. comment: "KRX 주식(마스터+일별) 수집");
  117. migrationBuilder.AddColumn<bool>(
  118. name: "DataCollection_KrxWarrantSync",
  119. table: "Config",
  120. type: "bit",
  121. nullable: false,
  122. defaultValue: false,
  123. comment: "KRX 신주인수권 수집");
  124. migrationBuilder.AddColumn<bool>(
  125. name: "DataCollection_MarketQuoteEnabled",
  126. table: "Config",
  127. type: "bit",
  128. nullable: false,
  129. defaultValue: false,
  130. comment: "주요종목·상품 시세 수집");
  131. migrationBuilder.AddColumn<string>(
  132. name: "DataCollection_OpenDartApiKeyEnc",
  133. table: "Config",
  134. type: "nvarchar(max)",
  135. nullable: true,
  136. comment: "OpenDART crtfc_key (암호화)");
  137. migrationBuilder.AddColumn<bool>(
  138. name: "DataCollection_OpenDartDisclosureSync",
  139. table: "Config",
  140. type: "bit",
  141. nullable: false,
  142. defaultValue: false,
  143. comment: "OpenDART 공시 수집");
  144. migrationBuilder.AddColumn<string>(
  145. name: "DataCollection_SeibroApiKeyEnc",
  146. table: "Config",
  147. type: "nvarchar(max)",
  148. nullable: true,
  149. comment: "SEIBro key (암호화)");
  150. migrationBuilder.AddColumn<bool>(
  151. name: "DataCollection_SeibroBondSync",
  152. table: "Config",
  153. type: "bit",
  154. nullable: false,
  155. defaultValue: false,
  156. comment: "SEIBro 채권·단기금융 수집");
  157. migrationBuilder.AddColumn<bool>(
  158. name: "DataCollection_SeibroCorpActionSync",
  159. table: "Config",
  160. type: "bit",
  161. nullable: false,
  162. defaultValue: false,
  163. comment: "SEIBro 기업행위·총회 수집");
  164. migrationBuilder.AddColumn<bool>(
  165. name: "DataCollection_SeibroDerivSync",
  166. table: "Config",
  167. type: "bit",
  168. nullable: false,
  169. defaultValue: false,
  170. comment: "SEIBro 파생결합증권 수집");
  171. migrationBuilder.AddColumn<bool>(
  172. name: "DataCollection_SeibroDividendSync",
  173. table: "Config",
  174. type: "bit",
  175. nullable: false,
  176. defaultValue: false,
  177. comment: "SEIBro 배당·권리 수집");
  178. migrationBuilder.AddColumn<bool>(
  179. name: "DataCollection_SeibroForeignSync",
  180. table: "Config",
  181. type: "bit",
  182. nullable: false,
  183. defaultValue: false,
  184. comment: "SEIBro 외화증권 수집");
  185. migrationBuilder.AddColumn<bool>(
  186. name: "DataCollection_SeibroIssuerSync",
  187. table: "Config",
  188. type: "bit",
  189. nullable: false,
  190. defaultValue: false,
  191. comment: "SEIBro 발행회사번호 부트스트랩");
  192. migrationBuilder.AddColumn<bool>(
  193. name: "DataCollection_SeibroSupplySync",
  194. table: "Config",
  195. type: "bit",
  196. nullable: false,
  197. defaultValue: false,
  198. comment: "SEIBro 수급 이벤트 수집");
  199. migrationBuilder.AddColumn<bool>(
  200. name: "DataCollection_StockDataDailyPriceSync",
  201. table: "Config",
  202. type: "bit",
  203. nullable: false,
  204. defaultValue: false,
  205. comment: "금융위 일별시세 수집");
  206. migrationBuilder.AddColumn<bool>(
  207. name: "DataCollection_StockDataMasterSync",
  208. table: "Config",
  209. type: "bit",
  210. nullable: false,
  211. defaultValue: false,
  212. comment: "금융위 종목마스터 수집");
  213. migrationBuilder.AddColumn<bool>(
  214. name: "DataCollection_WorldIndexEnabled",
  215. table: "Config",
  216. type: "bit",
  217. nullable: false,
  218. defaultValue: false,
  219. comment: "세계지수 수집");
  220. migrationBuilder.AddColumn<string>(
  221. name: "External_KakaoAdminKeyEnc",
  222. table: "Config",
  223. type: "nvarchar(max)",
  224. nullable: true,
  225. comment: "카카오 Admin 키 (암호화)");
  226. migrationBuilder.AddColumn<string>(
  227. name: "External_KakaoJavascriptKey",
  228. table: "Config",
  229. type: "nvarchar(max)",
  230. nullable: true,
  231. comment: "카카오 JavaScript 키");
  232. migrationBuilder.AddColumn<string>(
  233. name: "External_KakaoRestApiKeyEnc",
  234. table: "Config",
  235. type: "nvarchar(max)",
  236. nullable: true,
  237. comment: "카카오 REST API 키 (암호화)");
  238. migrationBuilder.AddColumn<string>(
  239. name: "External_NaverClientId",
  240. table: "Config",
  241. type: "nvarchar(max)",
  242. nullable: true,
  243. comment: "네이버 로그인 Client ID");
  244. migrationBuilder.AddColumn<string>(
  245. name: "External_NaverClientSecretEnc",
  246. table: "Config",
  247. type: "nvarchar(max)",
  248. nullable: true,
  249. comment: "네이버 로그인 Client Secret (암호화)");
  250. migrationBuilder.AddColumn<string>(
  251. name: "External_NaverSearchClientId",
  252. table: "Config",
  253. type: "nvarchar(max)",
  254. nullable: true,
  255. comment: "네이버 검색 API Client ID");
  256. migrationBuilder.AddColumn<string>(
  257. name: "External_NaverSearchClientSecretEnc",
  258. table: "Config",
  259. type: "nvarchar(max)",
  260. nullable: true,
  261. comment: "네이버 검색 API Client Secret (암호화)");
  262. }
  263. /// <inheritdoc />
  264. protected override void Down(MigrationBuilder migrationBuilder)
  265. {
  266. migrationBuilder.DropColumn(
  267. name: "DataCollection_DataGoKrServiceKeyEnc",
  268. table: "Config");
  269. migrationBuilder.DropColumn(
  270. name: "DataCollection_KoreaEximExchangeKeyEnc",
  271. table: "Config");
  272. migrationBuilder.DropColumn(
  273. name: "DataCollection_KoreaEximIntlRateKeyEnc",
  274. table: "Config");
  275. migrationBuilder.DropColumn(
  276. name: "DataCollection_KoreaEximLoanRateKeyEnc",
  277. table: "Config");
  278. migrationBuilder.DropColumn(
  279. name: "DataCollection_KoreaEximMacroSync",
  280. table: "Config");
  281. migrationBuilder.DropColumn(
  282. name: "DataCollection_KosisApiKeyEnc",
  283. table: "Config");
  284. migrationBuilder.DropColumn(
  285. name: "DataCollection_KosisSync",
  286. table: "Config");
  287. migrationBuilder.DropColumn(
  288. name: "DataCollection_KrxApiKeyEnc",
  289. table: "Config");
  290. migrationBuilder.DropColumn(
  291. name: "DataCollection_KrxBondIndexSync",
  292. table: "Config");
  293. migrationBuilder.DropColumn(
  294. name: "DataCollection_KrxBondSync",
  295. table: "Config");
  296. migrationBuilder.DropColumn(
  297. name: "DataCollection_KrxCommoditySync",
  298. table: "Config");
  299. migrationBuilder.DropColumn(
  300. name: "DataCollection_KrxDerivativeSync",
  301. table: "Config");
  302. migrationBuilder.DropColumn(
  303. name: "DataCollection_KrxEsgSync",
  304. table: "Config");
  305. migrationBuilder.DropColumn(
  306. name: "DataCollection_KrxEtpSync",
  307. table: "Config");
  308. migrationBuilder.DropColumn(
  309. name: "DataCollection_KrxIndexSync",
  310. table: "Config");
  311. migrationBuilder.DropColumn(
  312. name: "DataCollection_KrxStockSync",
  313. table: "Config");
  314. migrationBuilder.DropColumn(
  315. name: "DataCollection_KrxWarrantSync",
  316. table: "Config");
  317. migrationBuilder.DropColumn(
  318. name: "DataCollection_MarketQuoteEnabled",
  319. table: "Config");
  320. migrationBuilder.DropColumn(
  321. name: "DataCollection_OpenDartApiKeyEnc",
  322. table: "Config");
  323. migrationBuilder.DropColumn(
  324. name: "DataCollection_OpenDartDisclosureSync",
  325. table: "Config");
  326. migrationBuilder.DropColumn(
  327. name: "DataCollection_SeibroApiKeyEnc",
  328. table: "Config");
  329. migrationBuilder.DropColumn(
  330. name: "DataCollection_SeibroBondSync",
  331. table: "Config");
  332. migrationBuilder.DropColumn(
  333. name: "DataCollection_SeibroCorpActionSync",
  334. table: "Config");
  335. migrationBuilder.DropColumn(
  336. name: "DataCollection_SeibroDerivSync",
  337. table: "Config");
  338. migrationBuilder.DropColumn(
  339. name: "DataCollection_SeibroDividendSync",
  340. table: "Config");
  341. migrationBuilder.DropColumn(
  342. name: "DataCollection_SeibroForeignSync",
  343. table: "Config");
  344. migrationBuilder.DropColumn(
  345. name: "DataCollection_SeibroIssuerSync",
  346. table: "Config");
  347. migrationBuilder.DropColumn(
  348. name: "DataCollection_SeibroSupplySync",
  349. table: "Config");
  350. migrationBuilder.DropColumn(
  351. name: "DataCollection_StockDataDailyPriceSync",
  352. table: "Config");
  353. migrationBuilder.DropColumn(
  354. name: "DataCollection_StockDataMasterSync",
  355. table: "Config");
  356. migrationBuilder.DropColumn(
  357. name: "DataCollection_WorldIndexEnabled",
  358. table: "Config");
  359. migrationBuilder.DropColumn(
  360. name: "External_KakaoAdminKeyEnc",
  361. table: "Config");
  362. migrationBuilder.DropColumn(
  363. name: "External_KakaoJavascriptKey",
  364. table: "Config");
  365. migrationBuilder.DropColumn(
  366. name: "External_KakaoRestApiKeyEnc",
  367. table: "Config");
  368. migrationBuilder.DropColumn(
  369. name: "External_NaverClientId",
  370. table: "Config");
  371. migrationBuilder.DropColumn(
  372. name: "External_NaverClientSecretEnc",
  373. table: "Config");
  374. migrationBuilder.DropColumn(
  375. name: "External_NaverSearchClientId",
  376. table: "Config");
  377. migrationBuilder.DropColumn(
  378. name: "External_NaverSearchClientSecretEnc",
  379. table: "Config");
  380. }
  381. }
  382. }