| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace Infrastructure.Migrations.AppDb;
- /// <inheritdoc />
- public partial class AddChatExpConfigAndMemberExpLogBroadcastSession : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn<int>(
- name: "BroadcastSessionID",
- table: "MemberExpLog",
- type: "int",
- nullable: true,
- comment: "방송 세션 ID (리더보드 집계 대상)");
- migrationBuilder.AddColumn<int>(
- name: "ChannelID",
- table: "MemberExpLog",
- type: "int",
- nullable: true,
- comment: "채널 ID (channel 단위 조회용)");
- migrationBuilder.AddColumn<int>(
- name: "ChatExp_ChatXpPerMessage",
- table: "Config",
- type: "int",
- nullable: false,
- defaultValue: 1,
- comment: "채팅 1건당 지급 XP");
- migrationBuilder.AddColumn<int>(
- name: "ChatExp_ChatXpSessionLimit",
- table: "Config",
- type: "int",
- nullable: false,
- defaultValue: 50,
- comment: "방송 세션당 채팅 XP 상한");
- migrationBuilder.AddColumn<int>(
- name: "ChatExp_CrownTopN",
- table: "Config",
- type: "int",
- nullable: false,
- defaultValue: 3,
- comment: "크라운 뱃지 Top N");
- migrationBuilder.AddColumn<int>(
- name: "ChatExp_DonationXpPerAmount",
- table: "Config",
- type: "int",
- nullable: false,
- defaultValue: 1000,
- comment: "후원 N POINT당 1 XP");
- migrationBuilder.AddColumn<int>(
- name: "ChatExp_LeaderboardSize",
- table: "Config",
- type: "int",
- nullable: false,
- defaultValue: 50,
- comment: "리더보드 Top N");
- migrationBuilder.AddColumn<int>(
- name: "ChatExp_MinContentLength",
- table: "Config",
- type: "int",
- nullable: false,
- defaultValue: 2,
- comment: "XP 적립 최소 글자수");
- migrationBuilder.AddColumn<int>(
- name: "ChatExp_RateLimitSec",
- table: "Config",
- type: "int",
- nullable: false,
- defaultValue: 2,
- comment: "채팅 쿨다운(초)");
- migrationBuilder.AddColumn<bool>(
- name: "ChatExp_UxShowLeaderboard",
- table: "Config",
- type: "bit",
- nullable: false,
- defaultValue: true,
- comment: "watch에서 리더보드 노출");
- migrationBuilder.AddColumn<bool>(
- name: "ChatExp_UxShowMyXpBadge",
- table: "Config",
- type: "bit",
- nullable: false,
- defaultValue: true,
- comment: "내 XP 뱃지 노출");
- migrationBuilder.CreateIndex(
- name: "IX_MemberExpLog_BroadcastSessionID_MemberID",
- table: "MemberExpLog",
- columns: new[] { "BroadcastSessionID", "MemberID" });
- migrationBuilder.CreateIndex(
- name: "IX_MemberExpLog_ChannelID_MemberID_CreatedAt",
- table: "MemberExpLog",
- columns: new[] { "ChannelID", "MemberID", "CreatedAt" });
- migrationBuilder.AddForeignKey(
- name: "FK_MemberExpLog_BroadcastSession_BroadcastSessionID",
- table: "MemberExpLog",
- column: "BroadcastSessionID",
- principalTable: "BroadcastSession",
- principalColumn: "ID",
- onDelete: ReferentialAction.NoAction);
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_MemberExpLog_BroadcastSession_BroadcastSessionID",
- table: "MemberExpLog");
- migrationBuilder.DropIndex(
- name: "IX_MemberExpLog_BroadcastSessionID_MemberID",
- table: "MemberExpLog");
- migrationBuilder.DropIndex(
- name: "IX_MemberExpLog_ChannelID_MemberID_CreatedAt",
- table: "MemberExpLog");
- migrationBuilder.DropColumn(
- name: "BroadcastSessionID",
- table: "MemberExpLog");
- migrationBuilder.DropColumn(
- name: "ChannelID",
- table: "MemberExpLog");
- migrationBuilder.DropColumn(
- name: "ChatExp_ChatXpPerMessage",
- table: "Config");
- migrationBuilder.DropColumn(
- name: "ChatExp_ChatXpSessionLimit",
- table: "Config");
- migrationBuilder.DropColumn(
- name: "ChatExp_CrownTopN",
- table: "Config");
- migrationBuilder.DropColumn(
- name: "ChatExp_DonationXpPerAmount",
- table: "Config");
- migrationBuilder.DropColumn(
- name: "ChatExp_LeaderboardSize",
- table: "Config");
- migrationBuilder.DropColumn(
- name: "ChatExp_MinContentLength",
- table: "Config");
- migrationBuilder.DropColumn(
- name: "ChatExp_RateLimitSec",
- table: "Config");
- migrationBuilder.DropColumn(
- name: "ChatExp_UxShowLeaderboard",
- table: "Config");
- migrationBuilder.DropColumn(
- name: "ChatExp_UxShowMyXpBadge",
- table: "Config");
- }
- }
|