| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace Infrastructure.Persistence.Migrations;
- /// <inheritdoc />
- public partial class Init : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "BannerPosition",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- Code = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false, comment: "위치 구분"),
- Subject = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "위치 명"),
- IsActive = table.Column<bool>(type: "bit", nullable: false, comment: "사용 여부"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_BannerPosition", x => x.ID);
- },
- comment: "배너 위치");
- migrationBuilder.CreateTable(
- name: "Config",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- LastUpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "마지막 수정일시"),
- RowVersion = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: false, comment: "동시성 제어용"),
- Basic_SiteName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "사이트 이름"),
- Basic_RootID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "최고 관리자 ID"),
- Basic_FromEmail = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true, comment: "송수신 이메일"),
- Basic_FromName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "송수신자 이름"),
- Basic_SmtpServer = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true, comment: "SMTP Server"),
- Basic_SmtpPort = table.Column<int>(type: "int", nullable: true, comment: "SMTP Port"),
- Basic_SmtpEnableSSL = table.Column<bool>(type: "bit", nullable: true, comment: "SMTP Enable SSL"),
- Basic_SmtpUsername = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true, comment: "SMTP Username"),
- Basic_SmtpPassword = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "SMTP Password (암호화 저장 권장)"),
- Basic_AdminWhiteIPList = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "관리자단 접근 가능 IP"),
- Basic_FrontWhiteIPList = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "사용자단 접근 가능 IP"),
- Basic_BlockAlertTitle = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true, comment: "차단 시 안내문 제목"),
- Basic_BlockAlertContent = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "차단 시 안내문 내용"),
- Basic_IsMaintenance = table.Column<bool>(type: "bit", nullable: false, comment: "점검 여부"),
- Basic_MaintenanceContent = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "점검 내용"),
- Meta_Keywords = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Meta Keywords"),
- Meta_Description = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Meta Description"),
- Meta_Author = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Meta Author"),
- Meta_Viewport = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Meta Viewport"),
- Meta_ApplicationName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Meta Application Name"),
- Meta_Generator = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Meta Generator"),
- Meta_Robots = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Meta Robots"),
- Meta_Adds = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Company_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Company_RegNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Company_Owner = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Company_Tel = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Company_Fax = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Company_RetailSaleNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Company_AddedSaleNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Company_ZipCode = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "사업장 주소(우편번호)"),
- Company_Hosting = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true, comment: "호스팅 서비스"),
- Company_AdminName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "정보관리책임자"),
- Company_AdminEmail = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true, comment: "정보관리책임자 E-mail"),
- Company_SiteUrl = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true, comment: "사이트 주소"),
- Company_BankCode = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "입금 계좌(은행 코드)"),
- Company_BankOwner = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "예금주"),
- Company_BankNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "계좌번호"),
- Account_IsRegisterBlock = table.Column<bool>(type: "bit", nullable: false, comment: "회원가입 차단"),
- Account_IsRegisterEmailAuth = table.Column<bool>(type: "bit", nullable: false, comment: "회원가입 시 이메일 인증"),
- Account_PasswordMinLength = table.Column<int>(type: "int", nullable: true, comment: "비밀번호 최소 길이"),
- Account_PasswordUppercaseLength = table.Column<int>(type: "int", nullable: true, comment: "비밀번호 최소 대문자 수"),
- Account_PasswordNumbersLength = table.Column<int>(type: "int", nullable: true, comment: "비밀번호 최소 숫자 수"),
- Account_PasswordSpecialcharsLength = table.Column<int>(type: "int", nullable: true, comment: "비밀번호 최소 특수문자 수"),
- Account_DeniedEmailList = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "금지 이메일"),
- Account_DeniedNameList = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "금지 별명"),
- Account_ChangeEmailDay = table.Column<int>(type: "int", nullable: true, comment: "이메일 갱신 주기(일)"),
- Account_ChangeNameDay = table.Column<int>(type: "int", nullable: true, comment: "별명 갱신 주기(일)"),
- Account_ChangeSummaryDay = table.Column<int>(type: "int", nullable: true, comment: "한마디 갱신 주기(일)"),
- Account_ChangeIntroDay = table.Column<int>(type: "int", nullable: true, comment: "자기소개 갱신 주기(일)"),
- Account_ChangePasswordDay = table.Column<int>(type: "int", nullable: true, comment: "비밀번호 갱신 주기(일)"),
- Account_MaxLoginTryCount = table.Column<int>(type: "int", nullable: true, comment: "로그인 시도 제한 횟수"),
- Account_MaxLoginTryLimitSecond = table.Column<int>(type: "int", nullable: true, comment: "로그인 시도 제한 시간(초)"),
- EmailTemplate_RegisterEmailFormTitle = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "회원가입 시 - 제목"),
- EmailTemplate_RegisterEmailFormContent = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "회원가입 시 - 내용"),
- EmailTemplate_RegistrationEmailFormTitle = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "회원가입 완료 - 제목"),
- EmailTemplate_RegistrationEmailFormContent = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "회원가입 완료 - 내용"),
- EmailTemplate_ResetPasswordEmailFormTitle = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "비밀번호 재설정 - 제목"),
- EmailTemplate_ResetPasswordEmailFormContent = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "비밀번호 재설정 - 내용"),
- EmailTemplate_ChangedPasswordEmailFormTitle = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "비밀번호 변경 완료 - 제목"),
- EmailTemplate_ChangedPasswordEmailFormContent = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "비밀번호 변경 완료 - 내용"),
- EmailTemplate_WithdrawEmailFormTitle = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "회원탈퇴 시 - 제목"),
- EmailTemplate_WithdrawEmailFormContent = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "회원탈퇴 시 - 내용"),
- EmailTemplate_EmailVerifyFormTitle = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "이메일 변경 시 - 제목"),
- EmailTemplate_EmailVerifyFormContent = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "이메일 변경 시 - 내용"),
- EmailTemplate_ChangedEmailFormTitle = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "이메일 변경 완료 - 제목"),
- EmailTemplate_ChangedEmailFormContent = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "이메일 변경 완료 - 내용"),
- External_YouTubeApiKeyEnc = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "YouTube API Key (암호화 저장 권장)"),
- External_YouTubeApiName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "YouTube API Name"),
- External_GoogleClientId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Google Client ID"),
- External_GoogleClientSecretEnc = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Google Client Secret (암호화 저장 권장)"),
- External_GoogleAppId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "Google APP ID")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Config", x => x.ID);
- },
- comment: "운영 정보 설정 값");
- migrationBuilder.CreateTable(
- name: "Document",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- Code = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false, comment: "주소"),
- Subject = table.Column<string>(type: "nvarchar(120)", maxLength: 120, nullable: false, comment: "제목"),
- Content = table.Column<string>(type: "nvarchar(max)", maxLength: 5000, nullable: true, comment: "내용"),
- IsActive = table.Column<bool>(type: "bit", nullable: false, comment: "사용 여부"),
- Views = table.Column<int>(type: "int", nullable: false, comment: "조회 수"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Document", x => x.ID);
- },
- comment: "문서");
- migrationBuilder.CreateTable(
- name: "EmailVerifyNumber",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- Type = table.Column<int>(type: "int", nullable: false, comment: "인증 유형 (이메일 인증 / 비밀번호 재설정)"),
- Email = table.Column<string>(type: "nvarchar(60)", maxLength: 60, nullable: false, comment: "이메일"),
- Code = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false, comment: "Code"),
- IsVerified = table.Column<bool>(type: "bit", nullable: false, comment: "인증 여부"),
- Expiration = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "만료 일시"),
- CreatedAt = table.Column<DateTime>(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<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- Type = table.Column<int>(type: "int", nullable: false, comment: "인증 유형 (이메일 인증 / 비밀번호 재설정)"),
- Email = table.Column<string>(type: "nvarchar(60)", maxLength: 60, nullable: false, comment: "이메일"),
- Token = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false, comment: "Token"),
- IsVerified = table.Column<bool>(type: "bit", nullable: false, comment: "인증 여부"),
- Expiration = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "만료 일시"),
- Additional = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "추가 정보(JSON)"),
- CreatedAt = table.Column<DateTime>(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<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- Code = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false, comment: "주소"),
- Subject = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "분류 명"),
- Order = table.Column<short>(type: "smallint", nullable: false, comment: "순서"),
- IsActive = table.Column<bool>(type: "bit", nullable: false, comment: "사용 여부"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FaqCategory", x => x.ID);
- },
- comment: "FAQ 분류");
- migrationBuilder.CreateTable(
- name: "MemberGrade",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- KorName = table.Column<string>(type: "nvarchar(240)", maxLength: 240, nullable: false, comment: "한글 명"),
- EngName = table.Column<string>(type: "nvarchar(120)", maxLength: 120, nullable: false, comment: "영문 명"),
- Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true, comment: "설명"),
- Order = table.Column<short>(type: "smallint", nullable: false, comment: "순서"),
- Image = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true, comment: "이미지"),
- RequiredExp = table.Column<int>(type: "int", nullable: false, comment: "누적 경험치"),
- RequiredAttendance = table.Column<long>(type: "bigint", nullable: false, comment: "누적 출석 수"),
- IsActive = table.Column<bool>(type: "bit", nullable: false, comment: "사용 여부"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시"),
- CreatedAt = table.Column<DateTime>(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<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- Subject = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "제목"),
- Content = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true, comment: "내용"),
- Link = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "주소"),
- StartAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "사용 기간 - 시작"),
- EndAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "사용 기간 - 종료"),
- Order = table.Column<short>(type: "smallint", nullable: false, comment: "순서"),
- IsActive = table.Column<bool>(type: "bit", nullable: false, comment: "사용 여부"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Popup", x => x.ID);
- },
- comment: "팝업");
- migrationBuilder.CreateTable(
- name: "BannerItem",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- PositionID = table.Column<int>(type: "int", nullable: false, comment: "배너 위치 ID"),
- Subject = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "배너 명"),
- DesktopImage = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true, comment: "이미지(Desktop)"),
- MobileImage = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true, comment: "이미지(Mobile)"),
- Link = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "주소"),
- Order = table.Column<short>(type: "smallint", nullable: false, comment: "순서"),
- IsActive = table.Column<bool>(type: "bit", nullable: false, comment: "사용 여부"),
- StartAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "사용 기간 - 시작"),
- EndAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "사용 기간 - 종료"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시"),
- CreatedAt = table.Column<DateTime>(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);
- },
- comment: "배너 아이템");
- migrationBuilder.CreateTable(
- name: "FaqItem",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- CategoryID = table.Column<int>(type: "int", nullable: false, comment: "분류 ID"),
- Question = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "질문"),
- Answer = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true, comment: "답변"),
- Order = table.Column<short>(type: "smallint", nullable: false, comment: "순서"),
- IsActive = table.Column<bool>(type: "bit", nullable: false, comment: "사용 여부"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시"),
- CreatedAt = table.Column<DateTime>(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);
- },
- comment: "FAQ 목록");
- migrationBuilder.CreateTable(
- name: "Member",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- MemberGradeID = table.Column<int>(type: "int", nullable: true, comment: "회원등급 PK"),
- SID = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "SID"),
- Email = table.Column<string>(type: "nvarchar(60)", maxLength: 60, nullable: false, comment: "이메일"),
- Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "별명"),
- FullName = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true, comment: "본명"),
- FirstName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "본명(성)"),
- LastName = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true, comment: "본명(이름)"),
- Password = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "비밀번호"),
- Intro = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true, comment: "자기소개"),
- Summary = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "한마디"),
- Phone = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true, comment: "연락처"),
- Birthday = table.Column<DateOnly>(type: "date", nullable: true, comment: "생년월일"),
- Gender = table.Column<int>(type: "int", nullable: true, comment: "성별"),
- Thunmbnail = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "썸네일"),
- Icon = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "아이콘"),
- IsEmailVerified = table.Column<bool>(type: "bit", nullable: false, comment: "이메일 인증 여부"),
- IsAuthCertified = table.Column<bool>(type: "bit", nullable: false, comment: "본인 인증 여부"),
- IsDenied = table.Column<bool>(type: "bit", nullable: false, comment: "차단 여부"),
- IsAdmin = table.Column<bool>(type: "bit", nullable: false, comment: "운영진 여부"),
- IsWithdraw = table.Column<bool>(type: "bit", nullable: false, comment: "탈퇴 여부"),
- IsCreator = table.Column<bool>(type: "bit", nullable: false, comment: "크리에이터 여부"),
- DeviceInfo = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: true, comment: "로그인 단말기 정보"),
- SignupIP = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true, comment: "회원가입 시 IP"),
- LastLoginIp = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true, comment: "마지막 로그인 IP"),
- IpAddress = table.Column<string>(type: "nvarchar(45)", maxLength: 45, nullable: true, comment: "IP Address"),
- UserAgent = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true, comment: "User-agent"),
- LastLoginAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "마지막 로그인 일시"),
- LastEmailChangedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "마지막 이메일 변경 일시"),
- LastNameChangedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "마지막 별명 변경 일시"),
- LastSummaryChangedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "마지막 한마디 변경 일시"),
- LastIntroChangedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "마지막 자기소개 변경 일시"),
- EmailVerifiedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "이메일 인증 일시"),
- AuthCertifiedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "본인인증 일시"),
- PasswordUpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "비밀번호 변경 일시"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "가입 일시"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시"),
- DeletedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "탈퇴 일시"),
- DeniedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "차단 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Member", x => x.ID);
- table.ForeignKey(
- name: "FK_Member_MemberGrade_MemberGradeID",
- column: x => x.MemberGradeID,
- principalTable: "MemberGrade",
- principalColumn: "ID",
- onDelete: ReferentialAction.SetNull);
- },
- comment: "회원 정보");
- migrationBuilder.CreateTable(
- name: "Channel",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- MemberID = table.Column<int>(type: "int", nullable: false, comment: "회원 ID"),
- SID = table.Column<string>(type: "nvarchar(24)", maxLength: 24, nullable: false, comment: "채널 ID"),
- Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false, comment: "채널 이름"),
- Handle = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true, comment: "핸들"),
- YouTubeUrl = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false, comment: "YouTube 채널 URL"),
- PlatformFeeRate = table.Column<decimal>(type: "decimal(5,2)", precision: 5, scale: 2, nullable: false, comment: "수수료(%)"),
- IsVerified = table.Column<bool>(type: "bit", nullable: false, comment: "인증 여부"),
- IsActive = table.Column<bool>(type: "bit", nullable: false, comment: "활성 여부"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Channel", x => x.ID);
- table.ForeignKey(
- name: "FK_Channel_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "채널 정보");
- migrationBuilder.CreateTable(
- name: "MemberApprove",
- columns: table => new
- {
- MemberID = table.Column<int>(type: "int", nullable: false, comment: "회원 ID"),
- IsReceiveSMS = table.Column<bool>(type: "bit", nullable: false, comment: "SMS 수신 여부"),
- ReceiveSMSConsentAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "SMS 수신 동의 일시"),
- IsReceiveEmail = table.Column<bool>(type: "bit", nullable: false, comment: "E-MAIL 수신 여부"),
- ReceiveEmailConsentAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "E-MAIL 수신 동의 일시"),
- IsReceiveNote = table.Column<bool>(type: "bit", nullable: false, comment: "쪽지 수신 여부"),
- ReceiveNoteConsentAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "쪽지 수신 동의 일시"),
- IsDisclosureInvest = table.Column<bool>(type: "bit", nullable: false, comment: "투자 현황 공개 여부"),
- DisclosureInvestConsentAt = table.Column<DateTime>(type: "datetime2", nullable: true, 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",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "회원 동의 및 수신 여부");
- migrationBuilder.CreateTable(
- name: "MemberEmailChangeLog",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- MemberID = table.Column<int>(type: "int", nullable: false, comment: "회원 ID"),
- BeforeEmail = table.Column<string>(type: "nvarchar(60)", maxLength: 60, nullable: true, comment: "이전 이메일"),
- AfterEmail = table.Column<string>(type: "nvarchar(60)", maxLength: 60, nullable: false, comment: "바뀐 이메일"),
- Referer = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "이전 페이지 주소"),
- IpAddress = table.Column<string>(type: "nvarchar(45)", maxLength: 45, nullable: true, comment: "IP Address"),
- UserAgent = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true, comment: "User Agent"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MemberEmailChangeLog", x => x.ID);
- table.ForeignKey(
- name: "FK_MemberEmailChangeLog_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "사용자 이메일 변경 내역");
- migrationBuilder.CreateTable(
- name: "MemberIntroChangeLog",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- MemberID = table.Column<int>(type: "int", nullable: false, comment: "회원 ID"),
- BeforeIntro = table.Column<string>(type: "nvarchar(3000)", maxLength: 3000, nullable: true, comment: "이전 자기소개"),
- AfterIntro = table.Column<string>(type: "nvarchar(3000)", maxLength: 3000, nullable: true, comment: "바꾼 자기소개"),
- Referer = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "이전 페이지 주소"),
- IpAddress = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true, comment: "IP Address"),
- UserAgent = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true, comment: "User Agent"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MemberIntroChangeLog", x => x.ID);
- table.ForeignKey(
- name: "FK_MemberIntroChangeLog_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "자기소개 변경 내역");
- migrationBuilder.CreateTable(
- name: "MemberLoginLog",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- MemberID = table.Column<int>(type: "int", nullable: true, comment: "회원 ID"),
- Success = table.Column<bool>(type: "bit", nullable: false, comment: "로그인 성공 여부 (0: 실패, 1: 성공)"),
- Account = table.Column<string>(type: "nvarchar(120)", maxLength: 120, nullable: false, comment: "로그인 시도한 계정"),
- Reason = table.Column<string>(type: "nvarchar(225)", maxLength: 225, nullable: true, comment: "실패 이유"),
- Referer = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "이전 페이지 주소"),
- Url = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true, comment: "요청 주소"),
- IpAddress = table.Column<string>(type: "nvarchar(45)", maxLength: 45, nullable: true, comment: "IP Address"),
- UserAgent = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true, comment: "User Agent"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MemberLoginLog", x => x.ID);
- table.ForeignKey(
- name: "FK_MemberLoginLog_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.SetNull);
- },
- comment: "로그인 기록");
- migrationBuilder.CreateTable(
- name: "MemberNameChangeLog",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- MemberID = table.Column<int>(type: "int", nullable: false, comment: "회원 ID"),
- BeforeName = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true, comment: "이전 별명"),
- AfterName = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true, comment: "바꾼 별명"),
- Referer = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "이전 페이지 주소"),
- IpAddress = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true, comment: "IP Address"),
- UserAgent = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true, comment: "User Agent"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MemberNameChangeLog", x => x.ID);
- table.ForeignKey(
- name: "FK_MemberNameChangeLog_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "별명 변경 내역");
- migrationBuilder.CreateTable(
- name: "MemberStats",
- columns: table => new
- {
- MemberID = table.Column<int>(type: "int", nullable: false, comment: "회원 ID"),
- RowVersion = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: false, comment: "동시성"),
- Exp = table.Column<long>(type: "bigint", nullable: false, comment: "경험치"),
- PostCount = table.Column<long>(type: "bigint", nullable: false, comment: "작성 게시글"),
- CommentCount = table.Column<long>(type: "bigint", nullable: false, comment: "작성 댓글"),
- LikeReceivedCount = table.Column<long>(type: "bigint", nullable: false, comment: "받은 좋아요 수"),
- LikeGivenCount = table.Column<long>(type: "bigint", nullable: false, comment: "누른 좋아요 수"),
- ReportedCount = table.Column<long>(type: "bigint", nullable: false, comment: "신고 당한 횟수"),
- BookmarkGivenCount = table.Column<long>(type: "bigint", nullable: false, comment: "즐겨찾기 글 수"),
- WarningCount = table.Column<int>(type: "int", nullable: false, comment: "경고 횟수"),
- SuspensionCount = table.Column<int>(type: "int", nullable: false, comment: "정지 횟수"),
- LoginCount = table.Column<long>(type: "bigint", nullable: false, comment: "로그인"),
- AttendanceCount = table.Column<long>(type: "bigint", nullable: false, comment: "출석"),
- FollowingCount = table.Column<long>(type: "bigint", nullable: false, comment: "구독 중"),
- FollowerCount = table.Column<long>(type: "bigint", nullable: false, comment: "구독자"),
- PaymentCount = table.Column<long>(type: "bigint", nullable: false, comment: "결제 횟수"),
- TotalPaidAmount = table.Column<long>(type: "bigint", nullable: false, comment: "누적 결제 금액"),
- TotalCanceledAmount = table.Column<long>(type: "bigint", nullable: false, comment: "누적 취소/환불 금액")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MemberStats", x => x.MemberID);
- table.ForeignKey(
- name: "FK_MemberStats_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "회원 활동 집계");
- migrationBuilder.CreateTable(
- name: "MemberSummaryChangeLog",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false, comment: "PK")
- .Annotation("SqlServer:Identity", "1, 1"),
- MemberID = table.Column<int>(type: "int", nullable: false, comment: "회원 ID"),
- BeforeSummary = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "이전 한마디"),
- AfterSummary = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "바꾼 한마디"),
- Referer = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "이전 페이지 주소"),
- IpAddress = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true, comment: "IP Address"),
- UserAgent = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true, comment: "User Agent"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "등록 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MemberSummaryChangeLog", x => x.ID);
- table.ForeignKey(
- name: "FK_MemberSummaryChangeLog_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "한마디 변경 내역");
- migrationBuilder.CreateTable(
- name: "Wallet",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- WalletKey = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Wallet", x => x.ID);
- table.UniqueConstraint("AK_Wallet_WalletKey", x => x.WalletKey);
- table.ForeignKey(
- name: "FK_Wallet_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "회원 지갑");
- migrationBuilder.CreateTable(
- name: "WalletBalance",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- WalletKey = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
- Type = table.Column<int>(type: "int", nullable: false),
- Amount = table.Column<decimal>(type: "decimal(18,0)", precision: 18, scale: 0, nullable: false),
- Currency = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_WalletBalance", x => x.ID);
- table.ForeignKey(
- name: "FK_WalletBalance_Wallet_WalletKey",
- column: x => x.WalletKey,
- principalTable: "Wallet",
- principalColumn: "WalletKey",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "회원 지갑 잔액");
- migrationBuilder.CreateTable(
- name: "WalletTransaction",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- WalletKey = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
- BalanceType = table.Column<int>(type: "int", nullable: false),
- TxType = table.Column<int>(type: "int", nullable: false),
- Amount = table.Column<decimal>(type: "decimal(18,0)", precision: 18, scale: 0, nullable: false),
- Currency = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
- BalanceAfter = table.Column<decimal>(type: "decimal(18,0)", precision: 18, scale: 0, nullable: false),
- BalanceAfterCurrency = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
- Reason = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
- RefID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- UserID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- Memo = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_WalletTransaction", x => x.ID);
- table.ForeignKey(
- name: "FK_WalletTransaction_Wallet_WalletKey",
- column: x => x.WalletKey,
- principalTable: "Wallet",
- principalColumn: "WalletKey",
- onDelete: ReferentialAction.Cascade);
- },
- 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_BannerItem_PositionID_Order_IsActive",
- table: "BannerItem",
- columns: new[] { "PositionID", "Order", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_BannerPosition_Code",
- table: "BannerPosition",
- column: "Code",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_BannerPosition_Code_IsActive",
- table: "BannerPosition",
- columns: new[] { "Code", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_BannerPosition_IsActive",
- table: "BannerPosition",
- column: "IsActive");
- migrationBuilder.CreateIndex(
- name: "IX_Channel_Handle",
- table: "Channel",
- column: "Handle",
- unique: true,
- filter: "[Handle] IS NOT NULL");
- migrationBuilder.CreateIndex(
- name: "IX_Channel_MemberID",
- table: "Channel",
- column: "MemberID",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_Channel_MemberID_IsActive",
- table: "Channel",
- columns: new[] { "MemberID", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_Channel_MemberID_IsVerified",
- table: "Channel",
- columns: new[] { "MemberID", "IsVerified" });
- migrationBuilder.CreateIndex(
- name: "IX_Channel_MemberID_IsVerified_IsActive",
- table: "Channel",
- columns: new[] { "MemberID", "IsVerified", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_Channel_Name",
- table: "Channel",
- column: "Name",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_Channel_SID",
- table: "Channel",
- column: "SID",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_Channel_YouTubeUrl",
- table: "Channel",
- column: "YouTubeUrl",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_Document_Code",
- table: "Document",
- column: "Code",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_Document_Code_IsActive",
- table: "Document",
- columns: new[] { "Code", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_Document_IsActive",
- table: "Document",
- column: "IsActive");
- migrationBuilder.CreateIndex(
- name: "IX_Document_Subject",
- table: "Document",
- column: "Subject");
- migrationBuilder.CreateIndex(
- name: "IX_EmailVerifyNumber_Code",
- table: "EmailVerifyNumber",
- column: "Code");
- 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_EmailVerifyNumber_Type_Code",
- table: "EmailVerifyNumber",
- columns: new[] { "Type", "Code" });
- migrationBuilder.CreateIndex(
- name: "IX_EmailVerifyNumber_Type_Code_IsVerified",
- table: "EmailVerifyNumber",
- columns: new[] { "Type", "Code", "IsVerified" });
- 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_Token",
- table: "EmailVerifyToken",
- column: "Token");
- migrationBuilder.CreateIndex(
- name: "IX_EmailVerifyToken_Type",
- table: "EmailVerifyToken",
- column: "Type");
- migrationBuilder.CreateIndex(
- name: "IX_EmailVerifyToken_Type_Email_Token",
- table: "EmailVerifyToken",
- columns: new[] { "Type", "Email", "Token" });
- migrationBuilder.CreateIndex(
- name: "IX_EmailVerifyToken_Type_Email_Token_IsVerified",
- table: "EmailVerifyToken",
- columns: new[] { "Type", "Email", "Token", "IsVerified" });
- migrationBuilder.CreateIndex(
- name: "IX_FaqCategory_Code",
- table: "FaqCategory",
- column: "Code",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_FaqCategory_Code_Order_IsActive",
- table: "FaqCategory",
- columns: new[] { "Code", "Order", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_FaqCategory_Order_IsActive",
- table: "FaqCategory",
- columns: new[] { "Order", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_FaqItem_CategoryID",
- table: "FaqItem",
- column: "CategoryID");
- migrationBuilder.CreateIndex(
- name: "IX_FaqItem_CategoryID_Order_IsActive",
- table: "FaqItem",
- columns: new[] { "CategoryID", "Order", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_FaqItem_IsActive",
- table: "FaqItem",
- column: "IsActive");
- migrationBuilder.CreateIndex(
- name: "IX_FaqItem_Order",
- table: "FaqItem",
- column: "Order");
- migrationBuilder.CreateIndex(
- name: "IX_FaqItem_Order_IsActive",
- table: "FaqItem",
- columns: new[] { "Order", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_Member_CreatedAt",
- table: "Member",
- column: "CreatedAt");
- migrationBuilder.CreateIndex(
- name: "IX_Member_DeletedAt",
- table: "Member",
- column: "DeletedAt");
- 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_Gender",
- table: "Member",
- column: "Gender");
- 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_IsCreator",
- table: "Member",
- column: "IsCreator");
- 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_MemberGradeID",
- table: "Member",
- column: "MemberGradeID");
- 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_MemberEmailChangeLog_CreatedAt",
- table: "MemberEmailChangeLog",
- column: "CreatedAt");
- migrationBuilder.CreateIndex(
- name: "IX_MemberEmailChangeLog_MemberID",
- table: "MemberEmailChangeLog",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_MemberGrade_EngName",
- table: "MemberGrade",
- column: "EngName",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_MemberGrade_IsActive",
- table: "MemberGrade",
- column: "IsActive");
- migrationBuilder.CreateIndex(
- name: "IX_MemberGrade_KorName",
- table: "MemberGrade",
- column: "KorName",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_MemberGrade_Order",
- table: "MemberGrade",
- column: "Order");
- migrationBuilder.CreateIndex(
- name: "IX_MemberGrade_Order_IsActive",
- table: "MemberGrade",
- columns: new[] { "Order", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_MemberIntroChangeLog_MemberID",
- table: "MemberIntroChangeLog",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_MemberLoginLog_Account",
- table: "MemberLoginLog",
- column: "Account");
- migrationBuilder.CreateIndex(
- name: "IX_MemberLoginLog_MemberID",
- table: "MemberLoginLog",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_MemberLoginLog_MemberID_Success",
- table: "MemberLoginLog",
- columns: new[] { "MemberID", "Success" });
- migrationBuilder.CreateIndex(
- name: "IX_MemberNameChangeLog_MemberID",
- table: "MemberNameChangeLog",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_MemberSummaryChangeLog_MemberID",
- table: "MemberSummaryChangeLog",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_Popup_Order",
- table: "Popup",
- column: "Order");
- migrationBuilder.CreateIndex(
- name: "IX_Popup_Order_IsActive",
- table: "Popup",
- columns: new[] { "Order", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_Popup_StartAt_EndAt_Order_IsActive",
- table: "Popup",
- columns: new[] { "StartAt", "EndAt", "Order", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_Wallet_MemberID",
- table: "Wallet",
- column: "MemberID",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_Wallet_WalletKey",
- table: "Wallet",
- column: "WalletKey",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_WalletBalance_WalletKey_Type",
- table: "WalletBalance",
- columns: new[] { "WalletKey", "Type" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_WalletTransaction_CreatedAt",
- table: "WalletTransaction",
- column: "CreatedAt");
- migrationBuilder.CreateIndex(
- name: "IX_WalletTransaction_WalletKey",
- table: "WalletTransaction",
- column: "WalletKey");
- migrationBuilder.CreateIndex(
- name: "IX_WalletTransaction_WalletKey_CreatedAt",
- table: "WalletTransaction",
- columns: new[] { "WalletKey", "CreatedAt" });
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "BannerItem");
- migrationBuilder.DropTable(
- name: "Channel");
- migrationBuilder.DropTable(
- name: "Config");
- migrationBuilder.DropTable(
- name: "Document");
- migrationBuilder.DropTable(
- name: "EmailVerifyNumber");
- migrationBuilder.DropTable(
- name: "EmailVerifyToken");
- migrationBuilder.DropTable(
- name: "FaqItem");
- migrationBuilder.DropTable(
- name: "MemberApprove");
- migrationBuilder.DropTable(
- name: "MemberEmailChangeLog");
- migrationBuilder.DropTable(
- name: "MemberIntroChangeLog");
- migrationBuilder.DropTable(
- name: "MemberLoginLog");
- migrationBuilder.DropTable(
- name: "MemberNameChangeLog");
- migrationBuilder.DropTable(
- name: "MemberStats");
- migrationBuilder.DropTable(
- name: "MemberSummaryChangeLog");
- migrationBuilder.DropTable(
- name: "Popup");
- migrationBuilder.DropTable(
- name: "WalletBalance");
- migrationBuilder.DropTable(
- name: "WalletTransaction");
- migrationBuilder.DropTable(
- name: "BannerPosition");
- migrationBuilder.DropTable(
- name: "FaqCategory");
- migrationBuilder.DropTable(
- name: "Wallet");
- migrationBuilder.DropTable(
- name: "Member");
- migrationBuilder.DropTable(
- name: "MemberGrade");
- }
- }
|