| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134 |
- 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");
- }
- }
- }
|