| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace Infrastructure.Migrations.AppDb
- {
- /// <inheritdoc />
- public partial class AddDisclosure : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "Disclosure",
- columns: table => new
- {
- ID = table.Column<long>(type: "bigint", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- RceptNo = table.Column<string>(type: "nvarchar(14)", maxLength: 14, nullable: false, comment: "접수번호 (rcept_no, 14자리)"),
- CorpCode = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: false, comment: "고유번호 (corp_code, 8자리)"),
- CorpName = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false, comment: "법인명 (corp_name)"),
- StockCode = table.Column<string>(type: "nvarchar(6)", maxLength: 6, nullable: true, comment: "종목코드 (stock_code, 6자리) — 비상장이면 null"),
- CorpCls = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false, comment: "법인구분 (corp_cls, Y유가/K코스닥/N코넥스/E기타)"),
- ReportNm = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false, comment: "보고서명 (report_nm)"),
- FlrNm = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false, comment: "공시 제출인명 (flr_nm)"),
- RceptDt = table.Column<DateOnly>(type: "date", nullable: false, comment: "접수일자 (rcept_dt)"),
- Rm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "비고 (rm)"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Disclosure", x => x.ID);
- },
- comment: "전자공시(DART) 공시 목록 (OpenDART list.json)");
- migrationBuilder.CreateIndex(
- name: "IX_Disclosure_RceptDt",
- table: "Disclosure",
- column: "RceptDt",
- descending: new bool[0]);
- migrationBuilder.CreateIndex(
- name: "IX_Disclosure_RceptNo",
- table: "Disclosure",
- column: "RceptNo",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_Disclosure_StockCode_RceptDt",
- table: "Disclosure",
- columns: new[] { "StockCode", "RceptDt" },
- descending: new[] { false, true });
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "Disclosure");
- }
- }
- }
|