using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace bitforum.Migrations.DefaultDb { /// public partial class a1 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "BannerPosition", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), Code = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false, comment: "위치 구분"), Subject = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "위치 명"), IsActive = table.Column(type: "bit", nullable: false, comment: "사용 여부"), UpdatedAt = table.Column(type: "datetime2", nullable: true, comment: "수정 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_BannerPosition", x => x.ID); }); migrationBuilder.CreateTable( name: "Config", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Key = table.Column(type: "nvarchar(450)", nullable: false), Value = table.Column(type: "nvarchar(max)", nullable: true), Description = table.Column(type: "nvarchar(max)", nullable: true), CreatedAt = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Config", x => x.ID); }); migrationBuilder.CreateTable( name: "Document", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), Code = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false, comment: "주소"), Subject = table.Column(type: "nvarchar(120)", maxLength: 120, nullable: false, comment: "제목"), Content = table.Column(type: "nvarchar(max)", nullable: true, comment: "내용"), IsActive = table.Column(type: "bit", nullable: false, comment: "사용 여부"), Views = table.Column(type: "int", nullable: false, comment: "조회 수"), UpdatedAt = table.Column(type: "datetime2", nullable: true, comment: "수정 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_Document", x => x.ID); }); migrationBuilder.CreateTable( name: "EmailVerifyNumber", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), Type = table.Column(type: "int", nullable: false, comment: "인증 유형 (이메일 인증 / 비밀번호 재설정)"), Email = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false, comment: "이메일"), Code = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false, comment: "Token"), IsVerified = table.Column(type: "bit", nullable: false, comment: "인증 여부"), Expiration = table.Column(type: "datetime2", nullable: false, comment: "만료 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_EmailVerifyNumber", x => x.ID); }, comment: "이메일 인증 번호들"); migrationBuilder.CreateTable( name: "EmailVerifyToken", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), Type = table.Column(type: "int", nullable: false, comment: "인증 유형 (이메일 인증 / 비밀번호 재설정)"), Email = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false, comment: "이메일"), Token = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false, comment: "Token"), IsVerified = table.Column(type: "bit", nullable: false, comment: "인증 여부"), Expiration = table.Column(type: "datetime2", nullable: false, comment: "만료 일시"), Additional = table.Column(type: "nvarchar(max)", nullable: true, comment: "추가 정보(JSON)"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_EmailVerifyToken", x => x.ID); }, comment: "이메일 인증 토큰들"); migrationBuilder.CreateTable( name: "FaqCategory", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), Code = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false, comment: "주소"), Subject = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "분류 명"), Order = table.Column(type: "int", nullable: false, comment: "순서"), IsActive = table.Column(type: "bit", nullable: false, comment: "사용 여부"), UpdatedAt = table.Column(type: "datetime2", nullable: true, comment: "수정 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_FaqCategory", x => x.ID); }); migrationBuilder.CreateTable( name: "MemberGrade", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), KorName = table.Column(type: "nvarchar(120)", maxLength: 120, nullable: false, comment: "한글 명"), EngName = table.Column(type: "nvarchar(120)", maxLength: 120, nullable: false, comment: "영문 명"), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true, comment: "설명"), Order = table.Column(type: "smallint", nullable: false, comment: "순서"), Image = table.Column(type: "nvarchar(max)", nullable: true, comment: "이미지"), RequiredExp = table.Column(type: "int", nullable: false, comment: "최소 경험치(Exp)"), RequiredCoin = table.Column(type: "int", nullable: false, comment: "최소 코인(Coin)"), IsActive = table.Column(type: "bit", nullable: false, comment: "사용 여부"), UpdatedAt = table.Column(type: "datetime2", nullable: true, comment: "수정 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_MemberGrade", x => x.ID); }, comment: "회원 등급"); migrationBuilder.CreateTable( name: "Popup", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), Subject = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "제목"), Content = table.Column(type: "nvarchar(max)", nullable: true, comment: "내용"), Link = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "주소"), StartAt = table.Column(type: "datetime2", nullable: true, comment: "사용 기간 - 시작"), EndAt = table.Column(type: "datetime2", nullable: true, comment: "사용 기간 - 종료"), Order = table.Column(type: "smallint", nullable: false, comment: "순서"), IsActive = table.Column(type: "bit", nullable: false, comment: "사용 여부"), Views = table.Column(type: "int", nullable: false, comment: "조회 수"), UpdatedAt = table.Column(type: "datetime2", nullable: true, comment: "수정 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_Popup", x => x.ID); }); migrationBuilder.CreateTable( name: "RefreshToken", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), Token = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false, comment: "Token"), MemberID = table.Column(type: "int", nullable: false, comment: "회원 ID"), Expiration = table.Column(type: "datetime2", nullable: false, comment: "만료 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_RefreshToken", x => x.ID); }); migrationBuilder.CreateTable( name: "BannerItem", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), PositionID = table.Column(type: "int", nullable: false, comment: "배너 위치 ID"), Subject = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "배너 명"), Image = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true, comment: "이미지"), Width = table.Column(type: "int", nullable: true, comment: "가로 크기"), Height = table.Column(type: "int", nullable: true, comment: "세로 크기"), Link = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "주소"), Order = table.Column(type: "int", nullable: false, comment: "순서"), IsActive = table.Column(type: "bit", nullable: false, comment: "사용 여부"), StartAt = table.Column(type: "datetime2", nullable: true, comment: "사용 기간 - 시작"), EndAt = table.Column(type: "datetime2", nullable: true, comment: "사용 기간 - 종료"), Views = table.Column(type: "int", nullable: false, comment: "조회 수"), UpdatedAt = table.Column(type: "datetime2", nullable: true, comment: "수정 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_BannerItem", x => x.ID); table.ForeignKey( name: "FK_BannerItem_BannerPosition_PositionID", column: x => x.PositionID, principalTable: "BannerPosition", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "FaqItem", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), CategoryID = table.Column(type: "int", nullable: false, comment: "분류 ID"), Question = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "질문"), Answer = table.Column(type: "nvarchar(max)", nullable: true, comment: "답변"), Order = table.Column(type: "int", nullable: false, comment: "순서"), IsActive = table.Column(type: "bit", nullable: false, comment: "사용 여부"), Views = table.Column(type: "int", nullable: false, comment: "조회 수"), UpdatedAt = table.Column(type: "datetime2", nullable: true, comment: "수정 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_FaqItem", x => x.ID); table.ForeignKey( name: "FK_FaqItem_FaqCategory_CategoryID", column: x => x.CategoryID, principalTable: "FaqCategory", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "Member", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), GradeID = table.Column(type: "int", nullable: true, comment: "회원등급 ID"), SID = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "SID"), Email = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false, comment: "이메일"), Name = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "별명"), FullName = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true, comment: "본명"), FirstName = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "본명(성)"), LastName = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true, comment: "본명(이름)"), Password = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "비밀번호"), Intro = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true, comment: "자기소개"), Summary = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "한마디"), Coin = table.Column(type: "bigint", nullable: false, comment: "코인"), Exp = table.Column(type: "int", nullable: false, comment: "경험치"), Phone = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true, comment: "연락처"), Birthday = table.Column(type: "date", nullable: true, comment: "생년월일"), Gender = table.Column(type: "int", nullable: true, comment: "성별"), Photo = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "사진"), Icon = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "아이콘"), IsEmailVerified = table.Column(type: "bit", nullable: false, comment: "이메일 인증 여부"), IsAuthCertified = table.Column(type: "bit", nullable: false, comment: "본인 인증 여부"), IsDenied = table.Column(type: "bit", nullable: false, comment: "차단 여부"), IsAdmin = table.Column(type: "bit", nullable: false, comment: "운영진 여부"), IsWithdraw = table.Column(type: "bit", nullable: false, comment: "탈퇴 여부"), Following = table.Column(type: "int", nullable: false, comment: "구독 중"), Followed = table.Column(type: "int", nullable: false, comment: "구독자"), DeviceInfo = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: true, comment: "로그인 단말기 정보"), SignupIP = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: false, comment: "회원가입 시 IP"), LastLoginIp = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true, comment: "마지막 로그인 IP"), LastLoginAt = table.Column(type: "datetime2", nullable: true, comment: "마지막 로그인 일시"), LastEmailChangedAt = table.Column(type: "datetime2", nullable: true, comment: "마지막 이메일 변경 일시"), LastNameChangedAt = table.Column(type: "datetime2", nullable: true, comment: "마지막 별명 변경 일시"), EmailVerifiedAt = table.Column(type: "datetime2", nullable: true, comment: "이메일 인증 일시"), AuthCertifiedAt = table.Column(type: "datetime2", nullable: true, comment: "본인인증 일시"), PasswordUpdatedAt = table.Column(type: "datetime2", nullable: false, comment: "비밀번호 변경 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "가입 일시"), UpdatedAt = table.Column(type: "datetime2", nullable: true, comment: "수정 일시"), DeletedAt = table.Column(type: "datetime2", nullable: true, comment: "탈퇴 일시") }, constraints: table => { table.PrimaryKey("PK_Member", x => x.ID); table.ForeignKey( name: "FK_Member_MemberGrade_GradeID", column: x => x.GradeID, principalTable: "MemberGrade", principalColumn: "ID"); }, comment: "회원 정보"); migrationBuilder.CreateTable( name: "EmailChangeLog", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), MemberID = table.Column(type: "int", nullable: false, comment: "회원 ID"), BeforeEmail = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true, comment: "이전 이메일"), AfterEmail = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false, comment: "바꾼 이메일"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_EmailChangeLog", x => x.ID); table.ForeignKey( name: "FK_EmailChangeLog_Member_MemberID", column: x => x.MemberID, principalTable: "Member", principalColumn: "ID"); }, comment: "이메일 변경 내역"); migrationBuilder.CreateTable( name: "EmailLog", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), MemberID = table.Column(type: "int", nullable: true, comment: "회원 ID"), Status = table.Column(type: "nvarchar(20)", nullable: false, comment: "처리 여부"), Subject = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "제목"), Message = table.Column(type: "nvarchar(max)", nullable: true, comment: "내용"), ToAddress = table.Column(type: "nvarchar(120)", maxLength: 120, nullable: false, comment: "수신 주소"), ToName = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: true, comment: "수신자"), FromAddress = table.Column(type: "nvarchar(120)", maxLength: 120, nullable: false, comment: "발신 주소"), FromName = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: true, comment: "발신자"), ProcessedAt = table.Column(type: "datetime2", nullable: true, comment: "처리 일시"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_EmailLog", x => x.ID); table.ForeignKey( name: "FK_EmailLog_Member_MemberID", column: x => x.MemberID, principalTable: "Member", principalColumn: "ID", onDelete: ReferentialAction.SetNull); }); migrationBuilder.CreateTable( name: "LoginLog", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), MemberID = table.Column(type: "int", nullable: true, comment: "회원 ID"), Success = table.Column(type: "bit", nullable: false, comment: "로그인 성공 여부 (0: 실패, 1: 성공)"), Account = table.Column(type: "nvarchar(120)", maxLength: 120, nullable: false, comment: "로그인 시도한 계정"), Reason = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "실패 이유"), Referer = table.Column(type: "nvarchar(max)", nullable: true, comment: "이전 페이지 주소"), Url = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true, comment: "요청 주소"), IpAddress = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true, comment: "IP Address"), UserAgent = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true, comment: "User Agent"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_LoginLog", x => x.ID); table.ForeignKey( name: "FK_LoginLog_Member_MemberID", column: x => x.MemberID, principalTable: "Member", principalColumn: "ID", onDelete: ReferentialAction.SetNull); }, comment: "로그인 기록"); migrationBuilder.CreateTable( name: "MemberApprove", columns: table => new { MemberID = table.Column(type: "int", nullable: false, comment: "회원 ID"), IsReceiveSMS = table.Column(type: "bit", nullable: false, comment: "SMS 수신 여부"), IsReceiveEmail = table.Column(type: "bit", nullable: false, comment: "E-MAIL 수신 여부"), IsReceiveNote = table.Column(type: "bit", nullable: false, comment: "쪽지 수신 여부"), IsDisclosureInvest = table.Column(type: "bit", nullable: false, comment: "투자 현황 공개 여부") }, constraints: table => { table.PrimaryKey("PK_MemberApprove", x => x.MemberID); table.ForeignKey( name: "FK_MemberApprove_Member_MemberID", column: x => x.MemberID, principalTable: "Member", principalColumn: "ID"); }, comment: "회원 동의 및 수신 여부"); migrationBuilder.CreateTable( name: "NameChangeLog", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "PK") .Annotation("SqlServer:Identity", "1, 1"), MemberID = table.Column(type: "int", nullable: false, comment: "회원 ID"), BeforeName = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true, comment: "이전 별명"), AfterName = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false, comment: "바꾼 별명"), CreatedAt = table.Column(type: "datetime2", nullable: false, comment: "등록 일시") }, constraints: table => { table.PrimaryKey("PK_NameChangeLog", x => x.ID); table.ForeignKey( name: "FK_NameChangeLog_Member_MemberID", column: x => x.MemberID, principalTable: "Member", principalColumn: "ID"); }, comment: "별명 변경 내역"); migrationBuilder.CreateIndex( name: "IX_BannerItem_IsActive", table: "BannerItem", column: "IsActive"); migrationBuilder.CreateIndex( name: "IX_BannerItem_Order", table: "BannerItem", column: "Order"); migrationBuilder.CreateIndex( name: "IX_BannerItem_PositionID", table: "BannerItem", column: "PositionID"); migrationBuilder.CreateIndex( name: "IX_BannerPosition_Code", table: "BannerPosition", column: "Code", unique: true); migrationBuilder.CreateIndex( name: "IX_BannerPosition_IsActive", table: "BannerPosition", column: "IsActive"); migrationBuilder.CreateIndex( name: "IX_Config_Key", table: "Config", column: "Key", unique: true); migrationBuilder.CreateIndex( name: "IX_Document_Code", table: "Document", column: "Code", unique: true); migrationBuilder.CreateIndex( name: "IX_Document_IsActive", table: "Document", column: "IsActive"); migrationBuilder.CreateIndex( name: "IX_EmailChangeLog_MemberID", table: "EmailChangeLog", column: "MemberID"); migrationBuilder.CreateIndex( name: "IX_EmailLog_MemberID", table: "EmailLog", column: "MemberID"); migrationBuilder.CreateIndex( name: "IX_EmailLog_Status", table: "EmailLog", column: "Status"); migrationBuilder.CreateIndex( name: "IX_EmailVerifyNumber_Email", table: "EmailVerifyNumber", column: "Email"); migrationBuilder.CreateIndex( name: "IX_EmailVerifyNumber_Expiration", table: "EmailVerifyNumber", column: "Expiration"); migrationBuilder.CreateIndex( name: "IX_EmailVerifyNumber_IsVerified", table: "EmailVerifyNumber", column: "IsVerified"); migrationBuilder.CreateIndex( name: "IX_EmailVerifyNumber_Type", table: "EmailVerifyNumber", column: "Type"); migrationBuilder.CreateIndex( name: "IX_EmailVerifyToken_Email", table: "EmailVerifyToken", column: "Email"); migrationBuilder.CreateIndex( name: "IX_EmailVerifyToken_Expiration", table: "EmailVerifyToken", column: "Expiration"); migrationBuilder.CreateIndex( name: "IX_EmailVerifyToken_IsVerified", table: "EmailVerifyToken", column: "IsVerified"); migrationBuilder.CreateIndex( name: "IX_EmailVerifyToken_Type", table: "EmailVerifyToken", column: "Type"); migrationBuilder.CreateIndex( name: "IX_FaqCategory_Code", table: "FaqCategory", column: "Code", unique: true); migrationBuilder.CreateIndex( name: "IX_FaqCategory_Order", table: "FaqCategory", column: "Order"); migrationBuilder.CreateIndex( name: "IX_FaqItem_CategoryID", table: "FaqItem", column: "CategoryID"); migrationBuilder.CreateIndex( name: "IX_FaqItem_IsActive", table: "FaqItem", column: "IsActive"); migrationBuilder.CreateIndex( name: "IX_FaqItem_Order", table: "FaqItem", column: "Order"); migrationBuilder.CreateIndex( name: "IX_LoginLog_MemberID", table: "LoginLog", column: "MemberID"); migrationBuilder.CreateIndex( name: "IX_Member_Email", table: "Member", column: "Email", unique: true); migrationBuilder.CreateIndex( name: "IX_Member_FullName", table: "Member", column: "FullName"); migrationBuilder.CreateIndex( name: "IX_Member_GradeID", table: "Member", column: "GradeID"); migrationBuilder.CreateIndex( name: "IX_Member_IsAdmin", table: "Member", column: "IsAdmin"); migrationBuilder.CreateIndex( name: "IX_Member_IsAuthCertified", table: "Member", column: "IsAuthCertified"); migrationBuilder.CreateIndex( name: "IX_Member_IsDenied", table: "Member", column: "IsDenied"); migrationBuilder.CreateIndex( name: "IX_Member_IsEmailVerified", table: "Member", column: "IsEmailVerified"); migrationBuilder.CreateIndex( name: "IX_Member_IsWithdraw", table: "Member", column: "IsWithdraw"); migrationBuilder.CreateIndex( name: "IX_Member_Name", table: "Member", column: "Name", unique: true, filter: "[Name] IS NOT NULL"); migrationBuilder.CreateIndex( name: "IX_Member_Phone", table: "Member", column: "Phone"); migrationBuilder.CreateIndex( name: "IX_Member_SID", table: "Member", column: "SID", unique: true); migrationBuilder.CreateIndex( name: "IX_MemberGrade_EngName", table: "MemberGrade", column: "EngName", unique: true); migrationBuilder.CreateIndex( name: "IX_MemberGrade_KorName", table: "MemberGrade", column: "KorName", unique: true); migrationBuilder.CreateIndex( name: "IX_NameChangeLog_MemberID", table: "NameChangeLog", column: "MemberID"); migrationBuilder.CreateIndex( name: "IX_Popup_IsActive", table: "Popup", column: "IsActive"); migrationBuilder.CreateIndex( name: "IX_Popup_Order", table: "Popup", column: "Order"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "BannerItem"); migrationBuilder.DropTable( name: "Config"); migrationBuilder.DropTable( name: "Document"); migrationBuilder.DropTable( name: "EmailChangeLog"); migrationBuilder.DropTable( name: "EmailLog"); migrationBuilder.DropTable( name: "EmailVerifyNumber"); migrationBuilder.DropTable( name: "EmailVerifyToken"); migrationBuilder.DropTable( name: "FaqItem"); migrationBuilder.DropTable( name: "LoginLog"); migrationBuilder.DropTable( name: "MemberApprove"); migrationBuilder.DropTable( name: "NameChangeLog"); migrationBuilder.DropTable( name: "Popup"); migrationBuilder.DropTable( name: "RefreshToken"); migrationBuilder.DropTable( name: "BannerPosition"); migrationBuilder.DropTable( name: "FaqCategory"); migrationBuilder.DropTable( name: "Member"); migrationBuilder.DropTable( name: "MemberGrade"); } } }