| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace Infrastructure.Migrations.AppDb
- {
- /// <inheritdoc />
- public partial class RemoveDonationSettlementDeveloperDomains : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "ApiApplicationScope");
- migrationBuilder.DropTable(
- name: "ApiCredential");
- migrationBuilder.DropTable(
- name: "ApiPersonalAccessToken");
- migrationBuilder.DropTable(
- name: "ApiPurchaseCancel");
- migrationBuilder.DropTable(
- name: "ApiRateLimit");
- migrationBuilder.DropTable(
- name: "ApiRequestLog");
- migrationBuilder.DropTable(
- name: "CrewDonationSummary");
- migrationBuilder.DropTable(
- name: "CrewInvitation");
- migrationBuilder.DropTable(
- name: "CrewSessionConsent");
- migrationBuilder.DropTable(
- name: "CrewWidgetConfig");
- migrationBuilder.DropTable(
- name: "DonationAlertAttempt");
- migrationBuilder.DropTable(
- name: "DonationAlertConfig");
- migrationBuilder.DropTable(
- name: "DonationGoalConfig");
- migrationBuilder.DropTable(
- name: "DonationMeta");
- migrationBuilder.DropTable(
- name: "DonationRankConfig");
- migrationBuilder.DropTable(
- name: "DonationRanking");
- migrationBuilder.DropTable(
- name: "DonorChannelStats");
- migrationBuilder.DropTable(
- name: "DonorTitleSelection");
- migrationBuilder.DropTable(
- name: "GameProductCatalog");
- migrationBuilder.DropTable(
- name: "NiceAuthSession");
- migrationBuilder.DropTable(
- name: "RankingSnapshot");
- migrationBuilder.DropTable(
- name: "Settlement");
- migrationBuilder.DropTable(
- name: "SettlementAccount");
- migrationBuilder.DropTable(
- name: "WithdrawalRequest");
- migrationBuilder.DropTable(
- name: "ApiPurchase");
- migrationBuilder.DropTable(
- name: "DonationAlert");
- migrationBuilder.DropTable(
- name: "ChannelTitle");
- migrationBuilder.DropTable(
- name: "Developer");
- migrationBuilder.DropTable(
- name: "ApiApplication");
- migrationBuilder.DropTable(
- name: "Donation");
- migrationBuilder.DropTable(
- name: "CrewMember");
- migrationBuilder.DropTable(
- name: "CrewSession");
- migrationBuilder.DropTable(
- name: "Crew");
- migrationBuilder.DropColumn(
- name: "ApiCommissionRate",
- table: "Game");
- migrationBuilder.AlterColumn<int>(
- name: "ChannelRewardAmount",
- table: "Order",
- type: "int",
- nullable: false,
- comment: "채널주 채널 보상 입금 금액 (비활성 — 과거 주문 호환)",
- oldClrType: typeof(int),
- oldType: "int",
- oldComment: "채널주 StoreRevenue 입금 금액");
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AlterColumn<int>(
- name: "ChannelRewardAmount",
- table: "Order",
- type: "int",
- nullable: false,
- comment: "채널주 StoreRevenue 입금 금액",
- oldClrType: typeof(int),
- oldType: "int",
- oldComment: "채널주 채널 보상 입금 금액 (비활성 — 과거 주문 호환)");
- migrationBuilder.AddColumn<decimal>(
- name: "ApiCommissionRate",
- table: "Game",
- type: "decimal(10,7)",
- precision: 10,
- scale: 7,
- nullable: false,
- defaultValue: 0m,
- comment: "API 결제 보고 채널 수수료율(%) — 0~100, 0=비대상");
- migrationBuilder.CreateTable(
- name: "ApiApplication",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- OwnerMemberID = table.Column<int>(type: "int", nullable: false),
- ApprovedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- HomepageUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- LogoPath = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- Status = table.Column<int>(type: "int", nullable: false),
- SuspendedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ApiApplication", x => x.ID);
- table.ForeignKey(
- name: "FK_ApiApplication_Member_OwnerMemberID",
- column: x => x.OwnerMemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "개발자 API 앱");
- migrationBuilder.CreateTable(
- name: "ApiPersonalAccessToken",
- columns: table => new
- {
- ID = table.Column<long>(type: "bigint", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- OwnerMemberID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- ExpiresAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- LastUsedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- RevokedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- ScopesCsv = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: false),
- TokenHash = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
- TokenHint = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ApiPersonalAccessToken", x => x.ID);
- table.ForeignKey(
- name: "FK_ApiPersonalAccessToken_Member_OwnerMemberID",
- column: x => x.OwnerMemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "Personal Access Token (PAT)");
- migrationBuilder.CreateTable(
- name: "ApiRequestLog",
- columns: table => new
- {
- ID = table.Column<long>(type: "bigint", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ApplicationID = table.Column<int>(type: "int", nullable: true),
- Endpoint = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
- IpAddress = table.Column<string>(type: "nvarchar(45)", maxLength: 45, nullable: true),
- Method = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
- PatID = table.Column<long>(type: "bigint", nullable: true),
- RequestedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- ResponseMs = table.Column<int>(type: "int", nullable: false),
- StatusCode = table.Column<int>(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ApiRequestLog", x => x.ID);
- },
- comment: "공개 API 호출 로그");
- migrationBuilder.CreateTable(
- name: "ChannelTitle",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false, comment: "채널 ID"),
- Color = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "칭호 색상 (hex)"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "생성 일시"),
- Description = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "칭호 설명"),
- IconUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true, comment: "칭호 아이콘 URL"),
- IsActive = table.Column<bool>(type: "bit", nullable: false, comment: "활성 여부"),
- MinAmount = table.Column<long>(type: "bigint", nullable: false, comment: "획득 조건 (누적 후원 최소 금액)"),
- Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "칭호 이름"),
- SortOrder = table.Column<int>(type: "int", nullable: false, comment: "정렬 순서"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ChannelTitle", x => x.ID);
- table.ForeignKey(
- name: "FK_ChannelTitle_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "채널별 칭호 (크리에이터 설정)");
- migrationBuilder.CreateTable(
- name: "Crew",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- InviteCode = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: true),
- IsActive = table.Column<bool>(type: "bit", nullable: false),
- MinAmount = table.Column<int>(type: "int", nullable: true),
- Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Crew", x => x.ID);
- table.ForeignKey(
- name: "FK_Crew_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_Crew_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "크루");
- migrationBuilder.CreateTable(
- name: "Developer",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- MemberID = table.Column<int>(type: "int", nullable: false),
- ApprovalReason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- ApprovalStatus = table.Column<int>(type: "int", nullable: false),
- ApprovedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- ApprovedByAdminID = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
- BusinessNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
- CeoName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- CompanyName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
- ContactName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- ContactPhone = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- KycCi = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
- KycDi = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
- KycStatus = table.Column<int>(type: "int", nullable: false),
- KycVerifiedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Developer", x => x.ID);
- table.ForeignKey(
- name: "FK_Developer_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "개발자 포털 가입 법인 정보 (Member 1:1)");
- migrationBuilder.CreateTable(
- name: "DonationAlertConfig",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- Amount = table.Column<int>(type: "int", nullable: false),
- AmountFontColor = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
- AmountFontFamily = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- AmountFontSize = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- DisplayDurationSec = table.Column<double>(type: "float", nullable: false),
- EnableImage = table.Column<bool>(type: "bit", nullable: false),
- EnableSound = table.Column<bool>(type: "bit", nullable: false),
- ImageUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- IsActive = table.Column<bool>(type: "bit", nullable: false),
- MatchType = table.Column<int>(type: "int", nullable: false),
- Message = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
- MessageFontColor = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
- MessageFontFamily = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- MessageFontSize = table.Column<int>(type: "int", nullable: false),
- NicknameFontColor = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
- NicknameFontFamily = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- NicknameFontSize = table.Column<int>(type: "int", nullable: false),
- PlayDelaySec = table.Column<double>(type: "float", nullable: false),
- PopupEffect = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
- SoundUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- TemplateFontColor = table.Column<string>(type: "nvarchar(max)", nullable: false),
- TemplateFontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- TemplateFontSize = table.Column<int>(type: "int", nullable: false),
- TextEffect = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
- Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DonationAlertConfig", x => x.ID);
- table.ForeignKey(
- name: "FK_DonationAlertConfig_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_DonationAlertConfig_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "후원 알림 위젯 설정");
- migrationBuilder.CreateTable(
- name: "DonationGoalConfig",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- AmountFontColor = table.Column<string>(type: "nvarchar(9)", maxLength: 9, nullable: false),
- AmountFontFamily = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- AmountFontSizePx = table.Column<int>(type: "int", nullable: false),
- BarBackgroundColor = table.Column<string>(type: "nvarchar(9)", maxLength: 9, nullable: false),
- BarColor = table.Column<string>(type: "nvarchar(9)", maxLength: 9, nullable: false),
- BarHeightPx = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- EndAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- IsActive = table.Column<bool>(type: "bit", nullable: false),
- IsShowPercent = table.Column<bool>(type: "bit", nullable: false),
- Period = table.Column<int>(type: "int", nullable: false, defaultValue: 6),
- StartAmount = table.Column<int>(type: "int", nullable: false),
- StartAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- Style = table.Column<int>(type: "int", nullable: false),
- TargetAmount = table.Column<int>(type: "int", nullable: false),
- Title = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
- TitleFontColor = table.Column<string>(type: "nvarchar(9)", maxLength: 9, nullable: false),
- TitleFontFamily = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- TitleFontSizePx = table.Column<int>(type: "int", nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DonationGoalConfig", x => x.ID);
- table.ForeignKey(
- name: "FK_DonationGoalConfig_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_DonationGoalConfig_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "후원 목표 위젯 설정");
- migrationBuilder.CreateTable(
- name: "DonationMeta",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- IsAccepting = table.Column<bool>(type: "bit", nullable: false),
- IsAudioOnly = table.Column<bool>(type: "bit", nullable: false),
- IsPaused = table.Column<bool>(type: "bit", nullable: false),
- IsVideoOnly = table.Column<bool>(type: "bit", nullable: false),
- MinAmount = table.Column<int>(type: "int", nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DonationMeta", x => x.ID);
- table.ForeignKey(
- name: "FK_DonationMeta_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_DonationMeta_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "후원 공통 설정");
- migrationBuilder.CreateTable(
- name: "DonationRankConfig",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- EndAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- IsActive = table.Column<bool>(type: "bit", nullable: false),
- IsShowAmount = table.Column<bool>(type: "bit", nullable: false),
- IsShowDonationCount = table.Column<bool>(type: "bit", nullable: false),
- IsShowGradeIcon = table.Column<bool>(type: "bit", nullable: false),
- IsShowMemberIcon = table.Column<bool>(type: "bit", nullable: false),
- MaxRankCount = table.Column<int>(type: "int", nullable: false),
- NameDisplayType = table.Column<int>(type: "int", nullable: false),
- NameMode = table.Column<bool>(type: "bit", nullable: true),
- Period = table.Column<int>(type: "int", nullable: false),
- Rank1FontColor = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Rank1FontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Rank1FontSizePx = table.Column<int>(type: "int", nullable: false),
- Rank2FontColor = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Rank2FontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Rank2FontSizePx = table.Column<int>(type: "int", nullable: false),
- Rank3FontColor = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Rank3FontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Rank3FontSizePx = table.Column<int>(type: "int", nullable: false),
- StartAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- Theme = table.Column<int>(type: "int", nullable: false),
- Title = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: false),
- TitleFontColor = table.Column<string>(type: "nvarchar(max)", nullable: false),
- TitleFontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- TitleFontSizePx = table.Column<int>(type: "int", nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DonationRankConfig", x => x.ID);
- table.ForeignKey(
- name: "FK_DonationRankConfig_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_DonationRankConfig_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "후원 순위 위젯 설정");
- migrationBuilder.CreateTable(
- name: "DonationRanking",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- SponsorMemberID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- DonationCount = table.Column<int>(type: "int", nullable: false),
- IsActive = table.Column<bool>(type: "bit", nullable: false),
- PeriodEnd = table.Column<DateTime>(type: "datetime2", nullable: true),
- PeriodStart = table.Column<DateTime>(type: "datetime2", nullable: false),
- PeriodType = table.Column<int>(type: "int", nullable: false),
- Rank = table.Column<int>(type: "int", nullable: false),
- SponsorName = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
- TotalAmount = table.Column<int>(type: "int", nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DonationRanking", x => x.ID);
- table.ForeignKey(
- name: "FK_DonationRanking_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_DonationRanking_Member_SponsorMemberID",
- column: x => x.SponsorMemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "후원 순위");
- migrationBuilder.CreateTable(
- name: "DonorChannelStats",
- columns: table => new
- {
- DonorMemberID = table.Column<int>(type: "int", nullable: false, comment: "후원자 회원 ID"),
- ChannelID = table.Column<int>(type: "int", nullable: false, comment: "채널 ID"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "생성 일시"),
- CumulativeAmount = table.Column<long>(type: "bigint", nullable: false, comment: "누적 후원 금액"),
- DonationCount = table.Column<int>(type: "int", nullable: false, comment: "후원 횟수"),
- FirstDonatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "첫 후원 일시"),
- LastDonatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "마지막 후원 일시"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DonorChannelStats", x => new { x.DonorMemberID, x.ChannelID });
- table.ForeignKey(
- name: "FK_DonorChannelStats_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_DonorChannelStats_Member_DonorMemberID",
- column: x => x.DonorMemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "후원자×채널 누적 후원 (칭호 획득 판정용)");
- migrationBuilder.CreateTable(
- name: "GameProductCatalog",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- GameID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- IsActive = table.Column<bool>(type: "bit", nullable: false),
- Price = table.Column<int>(type: "int", nullable: false),
- ProductID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_GameProductCatalog", x => x.ID);
- table.ForeignKey(
- name: "FK_GameProductCatalog_Game_GameID",
- column: x => x.GameID,
- principalTable: "Game",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "게임별 인앱 상품 SKU 정가 카탈로그 (API 결제 보고가 검증용)");
- migrationBuilder.CreateTable(
- name: "RankingSnapshot",
- 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"),
- BroadcastSec = table.Column<long>(type: "bigint", nullable: false, comment: "방송 시간 (초)"),
- Category = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true, comment: "카테고리 (전체/게임/버츄얼/토크/음악/먹방)"),
- DonorCount = table.Column<int>(type: "int", nullable: false, comment: "후원자 수"),
- LikeCount = table.Column<long>(type: "bigint", nullable: false, comment: "좋아요"),
- MoneyAmount = table.Column<long>(type: "bigint", nullable: false, comment: "수령/후원 금액"),
- Period = table.Column<int>(type: "int", nullable: false, comment: "기간 (1=오늘, 2=어제, 3=이번주, 4=이번달, 5=지난달, 6=전체)"),
- PeriodEnd = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "기간 종료"),
- PeriodStart = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "기간 시작"),
- PreviousRank = table.Column<int>(type: "int", nullable: true, comment: "전일 순위"),
- Rank = table.Column<int>(type: "int", nullable: false, comment: "순위"),
- Score = table.Column<long>(type: "bigint", nullable: false, comment: "종합 점수"),
- SnapshotAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "스냅샷 일시"),
- Type = table.Column<int>(type: "int", nullable: false, comment: "랭킹 종류 (1=종합, 2=크리에이터, 3=후원자)"),
- ViewCount = table.Column<long>(type: "bigint", nullable: false, comment: "조회수")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_RankingSnapshot", x => x.ID);
- table.ForeignKey(
- name: "FK_RankingSnapshot_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "랭킹 스냅샷 (일 1회 집계)");
- migrationBuilder.CreateTable(
- name: "Settlement",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- AdminMemo = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- ApprovedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- FeeAmount = table.Column<int>(type: "int", nullable: false),
- GrossAmount = table.Column<int>(type: "int", nullable: false),
- NetAmount = table.Column<int>(type: "int", nullable: false),
- PaidAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- PeriodEnd = table.Column<DateTime>(type: "datetime2", nullable: false),
- PeriodStart = table.Column<DateTime>(type: "datetime2", nullable: false),
- RequestedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- Status = table.Column<int>(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Settlement", x => x.ID);
- table.ForeignKey(
- name: "FK_Settlement_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_Settlement_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "정산");
- migrationBuilder.CreateTable(
- name: "SettlementAccount",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- AccountHolder = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- AccountNumber = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
- BankCode = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
- BankName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- IsVerified = table.Column<bool>(type: "bit", nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_SettlementAccount", x => x.ID);
- table.ForeignKey(
- name: "FK_SettlementAccount_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_SettlementAccount_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "정산 계좌");
- migrationBuilder.CreateTable(
- name: "WithdrawalRequest",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- AccountHolder = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- AccountNumber = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
- AdminMemo = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- BankCode = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
- BankName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
- DonationAmount = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "후원 수익(Donation) 잔액에서 차감되는 금액"),
- IncomeTax = table.Column<int>(type: "int", nullable: false),
- LocalTax = table.Column<int>(type: "int", nullable: false),
- NetAmount = table.Column<int>(type: "int", nullable: false),
- ProcessedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- RejectedReason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- RequestedAmount = table.Column<int>(type: "int", nullable: false),
- RequestedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- Status = table.Column<int>(type: "int", nullable: false),
- StoreRevenueAmount = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "상품 판매 수익(StoreRevenue) 잔액에서 차감되는 금액"),
- WithholdingTax = table.Column<int>(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_WithdrawalRequest", x => x.ID);
- table.ForeignKey(
- name: "FK_WithdrawalRequest_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_WithdrawalRequest_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "출금 요청");
- migrationBuilder.CreateTable(
- name: "ApiApplicationScope",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ApplicationID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- Scope = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ApiApplicationScope", x => x.ID);
- table.ForeignKey(
- name: "FK_ApiApplicationScope_ApiApplication_ApplicationID",
- column: x => x.ApplicationID,
- principalTable: "ApiApplication",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "앱이 요청한 scope 목록");
- migrationBuilder.CreateTable(
- name: "ApiCredential",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ApplicationID = table.Column<int>(type: "int", nullable: false),
- ClientID = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- LastUsedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- RevokedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- SecretHash = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
- SecretHint = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: false),
- Status = table.Column<int>(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ApiCredential", x => x.ID);
- table.ForeignKey(
- name: "FK_ApiCredential_ApiApplication_ApplicationID",
- column: x => x.ApplicationID,
- principalTable: "ApiApplication",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "OAuth2 Client Credentials");
- migrationBuilder.CreateTable(
- name: "ApiPurchase",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ApplicationID = table.Column<int>(type: "int", nullable: false),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- GameID = table.Column<int>(type: "int", nullable: false),
- CanceledAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- CatalogPrice = table.Column<int>(type: "int", nullable: true),
- CommissionAmount = table.Column<int>(type: "int", nullable: false),
- CommissionRate = table.Column<decimal>(type: "decimal(10,7)", precision: 10, scale: 7, nullable: false),
- ConfirmDueAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- ConfirmedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- CreditedMemberID = table.Column<int>(type: "int", nullable: false),
- Marketplace = table.Column<int>(type: "int", nullable: false),
- OrderID = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false),
- OrderPrice = table.Column<int>(type: "int", nullable: false),
- PriceMismatched = table.Column<bool>(type: "bit", nullable: false),
- ProductID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- Status = table.Column<int>(type: "int", nullable: false),
- SubID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ApiPurchase", x => x.ID);
- table.ForeignKey(
- name: "FK_ApiPurchase_ApiApplication_ApplicationID",
- column: x => x.ApplicationID,
- principalTable: "ApiApplication",
- principalColumn: "ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_ApiPurchase_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_ApiPurchase_Game_GameID",
- column: x => x.GameID,
- principalTable: "Game",
- principalColumn: "ID",
- onDelete: ReferentialAction.Restrict);
- },
- comment: "게임사 API 결제 보고 원장 (채널 판매 수수료, 14일 보류 후 확정)");
- migrationBuilder.CreateTable(
- name: "ApiRateLimit",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ApplicationID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- LimitPerMinute = table.Column<int>(type: "int", nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ApiRateLimit", x => x.ID);
- table.ForeignKey(
- name: "FK_ApiRateLimit_ApiApplication_ApplicationID",
- column: x => x.ApplicationID,
- principalTable: "ApiApplication",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "앱별 Rate Limit override");
- migrationBuilder.CreateTable(
- name: "DonorTitleSelection",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false, comment: "채널 ID"),
- DonorMemberID = table.Column<int>(type: "int", nullable: false, comment: "후원자 회원 ID"),
- SelectedTitleID = table.Column<int>(type: "int", nullable: true, comment: "선택 칭호 ID"),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "생성 일시"),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "수정 일시")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DonorTitleSelection", x => x.ID);
- table.ForeignKey(
- name: "FK_DonorTitleSelection_ChannelTitle_SelectedTitleID",
- column: x => x.SelectedTitleID,
- principalTable: "ChannelTitle",
- principalColumn: "ID",
- onDelete: ReferentialAction.SetNull);
- table.ForeignKey(
- name: "FK_DonorTitleSelection_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_DonorTitleSelection_Member_DonorMemberID",
- column: x => x.DonorMemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "후원자가 선택한 채널별 대표 칭호");
- migrationBuilder.CreateTable(
- name: "CrewInvitation",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- CrewID = table.Column<int>(type: "int", nullable: false),
- InvitedByMemberID = table.Column<int>(type: "int", nullable: false),
- TargetMemberID = table.Column<int>(type: "int", nullable: false),
- ExpiresAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- InvitedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- Nickname = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
- RespondedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- Role = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
- SortOrder = table.Column<int>(type: "int", nullable: false),
- Status = table.Column<int>(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_CrewInvitation", x => x.ID);
- table.ForeignKey(
- name: "FK_CrewInvitation_Crew_CrewID",
- column: x => x.CrewID,
- principalTable: "Crew",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_CrewInvitation_Member_InvitedByMemberID",
- column: x => x.InvitedByMemberID,
- principalTable: "Member",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_CrewInvitation_Member_TargetMemberID",
- column: x => x.TargetMemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "크루원 초대 이력");
- migrationBuilder.CreateTable(
- name: "CrewMember",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: true),
- CrewID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- IsActive = table.Column<bool>(type: "bit", nullable: false),
- JoinedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- Nickname = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
- Role = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
- SortOrder = table.Column<int>(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_CrewMember", x => x.ID);
- table.ForeignKey(
- name: "FK_CrewMember_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_CrewMember_Crew_CrewID",
- column: x => x.CrewID,
- principalTable: "Crew",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_CrewMember_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "크루원");
- migrationBuilder.CreateTable(
- name: "CrewSession",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- CrewID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- EndedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- StartedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- Status = table.Column<int>(type: "int", nullable: false),
- Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
- TotalAmount = table.Column<int>(type: "int", nullable: false),
- TotalDonationCount = table.Column<int>(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_CrewSession", x => x.ID);
- table.ForeignKey(
- name: "FK_CrewSession_Crew_CrewID",
- column: x => x.CrewID,
- principalTable: "Crew",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "크루 후원 방송 세션");
- migrationBuilder.CreateTable(
- name: "CrewWidgetConfig",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- CrewID = table.Column<int>(type: "int", nullable: false),
- MemberID = table.Column<int>(type: "int", nullable: false),
- BgColor = table.Column<string>(type: "nvarchar(7)", maxLength: 7, nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- EndAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- IsActive = table.Column<bool>(type: "bit", nullable: false),
- IsShowAmount = table.Column<bool>(type: "bit", nullable: false),
- IsShowContributionRate = table.Column<bool>(type: "bit", nullable: false),
- IsShowDonationCount = table.Column<bool>(type: "bit", nullable: false),
- IsShowMemberIcon = table.Column<bool>(type: "bit", nullable: false),
- MaxDisplayCount = table.Column<int>(type: "int", nullable: false),
- Period = table.Column<int>(type: "int", nullable: false),
- Rank1FontColor = table.Column<string>(type: "nvarchar(7)", maxLength: 7, nullable: false),
- Rank1FontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Rank1FontSizePx = table.Column<int>(type: "int", nullable: false),
- Rank2FontColor = table.Column<string>(type: "nvarchar(7)", maxLength: 7, nullable: false),
- Rank2FontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Rank2FontSizePx = table.Column<int>(type: "int", nullable: false),
- Rank3FontColor = table.Column<string>(type: "nvarchar(7)", maxLength: 7, nullable: false),
- Rank3FontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- Rank3FontSizePx = table.Column<int>(type: "int", nullable: false),
- RowFontColor = table.Column<string>(type: "nvarchar(7)", maxLength: 7, nullable: false),
- RowFontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- RowFontSizePx = table.Column<int>(type: "int", nullable: false),
- StartAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- Theme = table.Column<int>(type: "int", nullable: false),
- Title = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: false),
- TitleFontColor = table.Column<string>(type: "nvarchar(7)", maxLength: 7, nullable: false),
- TitleFontFamily = table.Column<string>(type: "nvarchar(max)", nullable: true),
- TitleFontSizePx = table.Column<int>(type: "int", nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_CrewWidgetConfig", x => x.ID);
- table.ForeignKey(
- name: "FK_CrewWidgetConfig_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_CrewWidgetConfig_Crew_CrewID",
- column: x => x.CrewID,
- principalTable: "Crew",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_CrewWidgetConfig_Member_MemberID",
- column: x => x.MemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "크루 위젯 설정");
- migrationBuilder.CreateTable(
- name: "NiceAuthSession",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- DeveloperID = table.Column<int>(type: "int", nullable: false),
- CompletedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- ExpiresAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- FailReason = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
- Iterators = table.Column<int>(type: "int", nullable: false),
- RequestNo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
- SessionToken = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
- Status = table.Column<int>(type: "int", nullable: false),
- Ticket = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
- TransactionID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- WebTransactionID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_NiceAuthSession", x => x.ID);
- table.ForeignKey(
- name: "FK_NiceAuthSession_Developer_DeveloperID",
- column: x => x.DeveloperID,
- principalTable: "Developer",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "NICE 통합인증 1회 진행 세션");
- migrationBuilder.CreateTable(
- name: "ApiPurchaseCancel",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- PurchaseID = table.Column<int>(type: "int", nullable: false),
- ApplicationID = table.Column<int>(type: "int", nullable: false),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- CreditedMemberID = table.Column<int>(type: "int", nullable: false),
- RecoveredAmount = table.Column<int>(type: "int", nullable: false),
- ShortfallAmount = table.Column<int>(type: "int", nullable: false),
- WasConfirmed = table.Column<bool>(type: "bit", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ApiPurchaseCancel", x => x.ID);
- table.ForeignKey(
- name: "FK_ApiPurchaseCancel_ApiPurchase_PurchaseID",
- column: x => x.PurchaseID,
- principalTable: "ApiPurchase",
- principalColumn: "ID",
- onDelete: ReferentialAction.Restrict);
- },
- comment: "API 결제 취소 감사 기록 (1 결제 1 취소)");
- migrationBuilder.CreateTable(
- name: "CrewDonationSummary",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- CrewMemberID = table.Column<int>(type: "int", nullable: false),
- CrewSessionID = table.Column<int>(type: "int", nullable: false),
- ContributionRate = table.Column<decimal>(type: "decimal(5,2)", precision: 5, scale: 2, nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- DonationCount = table.Column<int>(type: "int", nullable: false),
- Rank = table.Column<int>(type: "int", nullable: false),
- TotalAmount = table.Column<int>(type: "int", nullable: false),
- UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_CrewDonationSummary", x => x.ID);
- table.ForeignKey(
- name: "FK_CrewDonationSummary_CrewMember_CrewMemberID",
- column: x => x.CrewMemberID,
- principalTable: "CrewMember",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_CrewDonationSummary_CrewSession_CrewSessionID",
- column: x => x.CrewSessionID,
- principalTable: "CrewSession",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "크루원 후원 집계");
- migrationBuilder.CreateTable(
- name: "CrewSessionConsent",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- CrewMemberID = table.Column<int>(type: "int", nullable: false),
- CrewSessionID = table.Column<int>(type: "int", nullable: false),
- ConsentedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- IsConsented = table.Column<bool>(type: "bit", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_CrewSessionConsent", x => x.ID);
- table.ForeignKey(
- name: "FK_CrewSessionConsent_CrewMember_CrewMemberID",
- column: x => x.CrewMemberID,
- principalTable: "CrewMember",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_CrewSessionConsent_CrewSession_CrewSessionID",
- column: x => x.CrewSessionID,
- principalTable: "CrewSession",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "크루원 방송 동의");
- migrationBuilder.CreateTable(
- name: "Donation",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ChannelID = table.Column<int>(type: "int", nullable: false),
- CrewMemberID = table.Column<int>(type: "int", nullable: true),
- CrewSessionID = table.Column<int>(type: "int", nullable: true),
- ReceiverMemberID = table.Column<int>(type: "int", nullable: false),
- SponsorMemberID = table.Column<int>(type: "int", nullable: false),
- Amount = table.Column<int>(type: "int", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- FeeAmount = table.Column<int>(type: "int", nullable: false),
- FeeRate = table.Column<decimal>(type: "decimal(5,2)", precision: 5, scale: 2, nullable: false),
- IsTest = table.Column<bool>(type: "bit", nullable: false),
- Message = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- NetAmount = table.Column<int>(type: "int", nullable: false),
- SendName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Donation", x => x.ID);
- table.ForeignKey(
- name: "FK_Donation_Channel_ChannelID",
- column: x => x.ChannelID,
- principalTable: "Channel",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_Donation_CrewMember_CrewMemberID",
- column: x => x.CrewMemberID,
- principalTable: "CrewMember",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_Donation_CrewSession_CrewSessionID",
- column: x => x.CrewSessionID,
- principalTable: "CrewSession",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_Donation_Member_ReceiverMemberID",
- column: x => x.ReceiverMemberID,
- principalTable: "Member",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_Donation_Member_SponsorMemberID",
- column: x => x.SponsorMemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "후원 내역");
- migrationBuilder.CreateTable(
- name: "DonationAlert",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- DonationID = table.Column<int>(type: "int", nullable: false),
- ReceiverMemberID = table.Column<int>(type: "int", nullable: false),
- SponsorMemberID = table.Column<int>(type: "int", nullable: false),
- ArrivedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- CorrelationID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- IpAddress = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
- StartAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- Status = table.Column<int>(type: "int", nullable: false),
- TotalDelayMs = table.Column<double>(type: "float", nullable: true),
- UserAgent = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DonationAlert", x => x.ID);
- table.ForeignKey(
- name: "FK_DonationAlert_Donation_DonationID",
- column: x => x.DonationID,
- principalTable: "Donation",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_DonationAlert_Member_ReceiverMemberID",
- column: x => x.ReceiverMemberID,
- principalTable: "Member",
- principalColumn: "ID");
- table.ForeignKey(
- name: "FK_DonationAlert_Member_SponsorMemberID",
- column: x => x.SponsorMemberID,
- principalTable: "Member",
- principalColumn: "ID");
- },
- comment: "후원 알림 추적");
- migrationBuilder.CreateTable(
- name: "DonationAlertAttempt",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- DonationAlertID = table.Column<int>(type: "int", nullable: false),
- DonationID = table.Column<int>(type: "int", nullable: false),
- IpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
- SentAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- UserAgent = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DonationAlertAttempt", x => x.ID);
- table.ForeignKey(
- name: "FK_DonationAlertAttempt_DonationAlert_DonationAlertID",
- column: x => x.DonationAlertID,
- principalTable: "DonationAlert",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_DonationAlertAttempt_Donation_DonationID",
- column: x => x.DonationID,
- principalTable: "Donation",
- principalColumn: "ID");
- },
- comment: "후원 알림 재시도 기록");
- migrationBuilder.CreateIndex(
- name: "IX_ApiApplication_OwnerMemberID",
- table: "ApiApplication",
- column: "OwnerMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_ApiApplication_Status",
- table: "ApiApplication",
- column: "Status");
- migrationBuilder.CreateIndex(
- name: "IX_ApiApplicationScope_ApplicationID_Scope",
- table: "ApiApplicationScope",
- columns: new[] { "ApplicationID", "Scope" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_ApiCredential_ApplicationID",
- table: "ApiCredential",
- column: "ApplicationID");
- migrationBuilder.CreateIndex(
- name: "IX_ApiCredential_ClientID",
- table: "ApiCredential",
- column: "ClientID",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_ApiPersonalAccessToken_OwnerMemberID",
- table: "ApiPersonalAccessToken",
- column: "OwnerMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_ApiPersonalAccessToken_TokenHash",
- table: "ApiPersonalAccessToken",
- column: "TokenHash",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_ApiPurchase_ApplicationID_Marketplace_OrderID",
- table: "ApiPurchase",
- columns: new[] { "ApplicationID", "Marketplace", "OrderID" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_ApiPurchase_ChannelID",
- table: "ApiPurchase",
- column: "ChannelID");
- migrationBuilder.CreateIndex(
- name: "IX_ApiPurchase_CreatedAt",
- table: "ApiPurchase",
- column: "CreatedAt");
- migrationBuilder.CreateIndex(
- name: "IX_ApiPurchase_GameID",
- table: "ApiPurchase",
- column: "GameID");
- migrationBuilder.CreateIndex(
- name: "IX_ApiPurchase_Status_ConfirmDueAt",
- table: "ApiPurchase",
- columns: new[] { "Status", "ConfirmDueAt" });
- migrationBuilder.CreateIndex(
- name: "IX_ApiPurchaseCancel_ApplicationID",
- table: "ApiPurchaseCancel",
- column: "ApplicationID");
- migrationBuilder.CreateIndex(
- name: "IX_ApiPurchaseCancel_ChannelID",
- table: "ApiPurchaseCancel",
- column: "ChannelID");
- migrationBuilder.CreateIndex(
- name: "IX_ApiPurchaseCancel_CreatedAt",
- table: "ApiPurchaseCancel",
- column: "CreatedAt");
- migrationBuilder.CreateIndex(
- name: "IX_ApiPurchaseCancel_PurchaseID",
- table: "ApiPurchaseCancel",
- column: "PurchaseID",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_ApiRateLimit_ApplicationID",
- table: "ApiRateLimit",
- column: "ApplicationID",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_ApiRequestLog_ApplicationID",
- table: "ApiRequestLog",
- column: "ApplicationID");
- migrationBuilder.CreateIndex(
- name: "IX_ApiRequestLog_PatID",
- table: "ApiRequestLog",
- column: "PatID");
- migrationBuilder.CreateIndex(
- name: "IX_ApiRequestLog_RequestedAt",
- table: "ApiRequestLog",
- column: "RequestedAt");
- migrationBuilder.CreateIndex(
- name: "IX_ChannelTitle_ChannelID_MinAmount",
- table: "ChannelTitle",
- columns: new[] { "ChannelID", "MinAmount" });
- migrationBuilder.CreateIndex(
- name: "IX_ChannelTitle_ChannelID_SortOrder",
- table: "ChannelTitle",
- columns: new[] { "ChannelID", "SortOrder" });
- migrationBuilder.CreateIndex(
- name: "IX_Crew_ChannelID_IsActive",
- table: "Crew",
- columns: new[] { "ChannelID", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_Crew_InviteCode",
- table: "Crew",
- column: "InviteCode",
- unique: true,
- filter: "[InviteCode] IS NOT NULL");
- migrationBuilder.CreateIndex(
- name: "IX_Crew_MemberID",
- table: "Crew",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_CrewDonationSummary_CrewMemberID",
- table: "CrewDonationSummary",
- column: "CrewMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_CrewDonationSummary_CrewSessionID_CrewMemberID",
- table: "CrewDonationSummary",
- columns: new[] { "CrewSessionID", "CrewMemberID" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_CrewDonationSummary_CrewSessionID_Rank",
- table: "CrewDonationSummary",
- columns: new[] { "CrewSessionID", "Rank" });
- migrationBuilder.CreateIndex(
- name: "IX_CrewInvitation_CrewID_TargetMemberID_Status",
- table: "CrewInvitation",
- columns: new[] { "CrewID", "TargetMemberID", "Status" });
- migrationBuilder.CreateIndex(
- name: "IX_CrewInvitation_InvitedByMemberID",
- table: "CrewInvitation",
- column: "InvitedByMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_CrewInvitation_Status_ExpiresAt",
- table: "CrewInvitation",
- columns: new[] { "Status", "ExpiresAt" });
- migrationBuilder.CreateIndex(
- name: "IX_CrewInvitation_TargetMemberID",
- table: "CrewInvitation",
- column: "TargetMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_CrewMember_ChannelID",
- table: "CrewMember",
- column: "ChannelID");
- migrationBuilder.CreateIndex(
- name: "IX_CrewMember_CrewID_MemberID",
- table: "CrewMember",
- columns: new[] { "CrewID", "MemberID" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_CrewMember_MemberID",
- table: "CrewMember",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_CrewSession_CrewID_StartedAt",
- table: "CrewSession",
- columns: new[] { "CrewID", "StartedAt" });
- migrationBuilder.CreateIndex(
- name: "IX_CrewSession_CrewID_Status",
- table: "CrewSession",
- columns: new[] { "CrewID", "Status" });
- migrationBuilder.CreateIndex(
- name: "IX_CrewSessionConsent_CrewMemberID",
- table: "CrewSessionConsent",
- column: "CrewMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_CrewSessionConsent_CrewSessionID_CrewMemberID",
- table: "CrewSessionConsent",
- columns: new[] { "CrewSessionID", "CrewMemberID" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_CrewWidgetConfig_ChannelID",
- table: "CrewWidgetConfig",
- column: "ChannelID");
- migrationBuilder.CreateIndex(
- name: "IX_CrewWidgetConfig_CrewID",
- table: "CrewWidgetConfig",
- column: "CrewID");
- migrationBuilder.CreateIndex(
- name: "IX_CrewWidgetConfig_MemberID",
- table: "CrewWidgetConfig",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_Developer_ApprovalStatus",
- table: "Developer",
- column: "ApprovalStatus");
- migrationBuilder.CreateIndex(
- name: "IX_Developer_BusinessNumber",
- table: "Developer",
- column: "BusinessNumber");
- migrationBuilder.CreateIndex(
- name: "IX_Developer_MemberID",
- table: "Developer",
- column: "MemberID",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_Donation_ChannelID",
- table: "Donation",
- column: "ChannelID");
- migrationBuilder.CreateIndex(
- name: "IX_Donation_ChannelID_CreatedAt",
- table: "Donation",
- columns: new[] { "ChannelID", "CreatedAt" });
- migrationBuilder.CreateIndex(
- name: "IX_Donation_CrewMemberID",
- table: "Donation",
- column: "CrewMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_Donation_CrewSessionID",
- table: "Donation",
- column: "CrewSessionID");
- migrationBuilder.CreateIndex(
- name: "IX_Donation_ReceiverMemberID",
- table: "Donation",
- column: "ReceiverMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_Donation_SponsorMemberID",
- table: "Donation",
- column: "SponsorMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_Donation_SponsorMemberID_ReceiverMemberID",
- table: "Donation",
- columns: new[] { "SponsorMemberID", "ReceiverMemberID" });
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlert_CorrelationID",
- table: "DonationAlert",
- column: "CorrelationID",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlert_DonationID",
- table: "DonationAlert",
- column: "DonationID",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlert_ReceiverMemberID_Status_CreatedAt",
- table: "DonationAlert",
- columns: new[] { "ReceiverMemberID", "Status", "CreatedAt" },
- descending: new[] { false, false, true });
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlert_SponsorMemberID",
- table: "DonationAlert",
- column: "SponsorMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlert_Status",
- table: "DonationAlert",
- column: "Status");
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlertAttempt_DonationAlertID",
- table: "DonationAlertAttempt",
- column: "DonationAlertID");
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlertAttempt_DonationID_DonationAlertID",
- table: "DonationAlertAttempt",
- columns: new[] { "DonationID", "DonationAlertID" });
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlertConfig_ChannelID_IsActive",
- table: "DonationAlertConfig",
- columns: new[] { "ChannelID", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlertConfig_ChannelID_MatchType_Amount",
- table: "DonationAlertConfig",
- columns: new[] { "ChannelID", "MatchType", "Amount" });
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlertConfig_ChannelID_MemberID_Amount",
- table: "DonationAlertConfig",
- columns: new[] { "ChannelID", "MemberID", "Amount" });
- migrationBuilder.CreateIndex(
- name: "IX_DonationAlertConfig_MemberID",
- table: "DonationAlertConfig",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_DonationGoalConfig_ChannelID_IsActive",
- table: "DonationGoalConfig",
- columns: new[] { "ChannelID", "IsActive" });
- migrationBuilder.CreateIndex(
- name: "IX_DonationGoalConfig_ChannelID_MemberID",
- table: "DonationGoalConfig",
- columns: new[] { "ChannelID", "MemberID" });
- migrationBuilder.CreateIndex(
- name: "IX_DonationGoalConfig_MemberID",
- table: "DonationGoalConfig",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_DonationMeta_ChannelID_MemberID",
- table: "DonationMeta",
- columns: new[] { "ChannelID", "MemberID" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_DonationMeta_MemberID",
- table: "DonationMeta",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_DonationRankConfig_ChannelID",
- table: "DonationRankConfig",
- column: "ChannelID");
- migrationBuilder.CreateIndex(
- name: "IX_DonationRankConfig_MemberID",
- table: "DonationRankConfig",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_DonationRanking_ChannelID_PeriodType_PeriodStart_Rank",
- table: "DonationRanking",
- columns: new[] { "ChannelID", "PeriodType", "PeriodStart", "Rank" });
- migrationBuilder.CreateIndex(
- name: "IX_DonationRanking_ChannelID_SponsorMemberID_PeriodType_PeriodStart",
- table: "DonationRanking",
- columns: new[] { "ChannelID", "SponsorMemberID", "PeriodType", "PeriodStart" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_DonationRanking_SponsorMemberID",
- table: "DonationRanking",
- column: "SponsorMemberID");
- migrationBuilder.CreateIndex(
- name: "IX_DonorChannelStats_ChannelID_CumulativeAmount",
- table: "DonorChannelStats",
- columns: new[] { "ChannelID", "CumulativeAmount" },
- descending: new[] { false, true });
- migrationBuilder.CreateIndex(
- name: "IX_DonorTitleSelection_ChannelID",
- table: "DonorTitleSelection",
- column: "ChannelID");
- migrationBuilder.CreateIndex(
- name: "IX_DonorTitleSelection_DonorMemberID_ChannelID",
- table: "DonorTitleSelection",
- columns: new[] { "DonorMemberID", "ChannelID" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_DonorTitleSelection_SelectedTitleID",
- table: "DonorTitleSelection",
- column: "SelectedTitleID");
- migrationBuilder.CreateIndex(
- name: "IX_GameProductCatalog_GameID_ProductID",
- table: "GameProductCatalog",
- columns: new[] { "GameID", "ProductID" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_NiceAuthSession_DeveloperID_CreatedAt",
- table: "NiceAuthSession",
- columns: new[] { "DeveloperID", "CreatedAt" });
- migrationBuilder.CreateIndex(
- name: "IX_NiceAuthSession_SessionToken",
- table: "NiceAuthSession",
- column: "SessionToken",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_NiceAuthSession_Status",
- table: "NiceAuthSession",
- column: "Status");
- migrationBuilder.CreateIndex(
- name: "IX_RankingSnapshot_MemberID",
- table: "RankingSnapshot",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_RankingSnapshot_SnapshotAt",
- table: "RankingSnapshot",
- column: "SnapshotAt",
- descending: new bool[0]);
- migrationBuilder.CreateIndex(
- name: "IX_RankingSnapshot_Type_Period_Category_MemberID",
- table: "RankingSnapshot",
- columns: new[] { "Type", "Period", "Category", "MemberID" },
- unique: true,
- filter: "[Category] IS NOT NULL");
- migrationBuilder.CreateIndex(
- name: "IX_RankingSnapshot_Type_Period_Category_Rank",
- table: "RankingSnapshot",
- columns: new[] { "Type", "Period", "Category", "Rank" });
- migrationBuilder.CreateIndex(
- name: "IX_Settlement_ChannelID_PeriodStart_PeriodEnd",
- table: "Settlement",
- columns: new[] { "ChannelID", "PeriodStart", "PeriodEnd" });
- migrationBuilder.CreateIndex(
- name: "IX_Settlement_MemberID",
- table: "Settlement",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_Settlement_Status",
- table: "Settlement",
- column: "Status");
- migrationBuilder.CreateIndex(
- name: "IX_SettlementAccount_ChannelID_MemberID",
- table: "SettlementAccount",
- columns: new[] { "ChannelID", "MemberID" });
- migrationBuilder.CreateIndex(
- name: "IX_SettlementAccount_MemberID",
- table: "SettlementAccount",
- column: "MemberID");
- migrationBuilder.CreateIndex(
- name: "IX_WithdrawalRequest_ChannelID",
- table: "WithdrawalRequest",
- column: "ChannelID");
- migrationBuilder.CreateIndex(
- name: "IX_WithdrawalRequest_MemberID_RequestedAt",
- table: "WithdrawalRequest",
- columns: new[] { "MemberID", "RequestedAt" });
- migrationBuilder.CreateIndex(
- name: "IX_WithdrawalRequest_MemberID_Status",
- table: "WithdrawalRequest",
- columns: new[] { "MemberID", "Status" });
- }
- }
- }
|