Files
SVSimServer/SVSim.Database/Migrations/20260613172735_DropColosseumsTable.cs
gamer147 43a3665775 refactor(arena-colosseum): dedup colosseum_info source-of-truth
/mypage/index data.colosseum_info and /arena_colosseum/{top,get_fee_info}
now both project through ColosseumLobbyInfoBuilder.Build(ColosseumSeasonConfig).
One source of truth for the home-tab gating and the lobby reads — admins
flip the season on by writing to GameConfigs (per the runbook), no second
table to keep in sync.

* New ColosseumLobbyInfoBuilder — static projection from ColosseumSeasonConfig
  to the wire ColosseumLobbyInfo. Replaces ArenaColosseumController's private
  BuildColosseumInfo and MyPageController's BuildColosseumInfo(ColosseumConfig).
* MyPageController reads ColosseumSeasonConfig via IGameConfigService; the
  IGlobalsRepository.GetCurrentColosseum() call goes away.
* MyPageIndexResponse.ColosseumInfo retyped to the new ColosseumLobbyInfo.
* ColosseumSalesPeriodInfo relocated into the ArenaColosseum namespace
  alongside the rest of the family DTOs.
* Drops: Colosseums DB table (migration DropColosseumsTable), ColosseumConfig
  entity, the captured-shape Models.Dtos.ColosseumInfo DTO, ColosseumSeed,
  MyPageGlobalsImporter.ImportColosseumAsync + seed file colosseum.json,
  IGlobalsRepository.GetCurrentColosseum + impl, the two related tests.

Net: home-screen Grand Prix tab now hidden by default because the season
ships with IsColosseumPeriod=false. Full suite: 1345/1345 (was 1347 — the
2 dropped tests covered the now-dead surface).
2026-06-13 13:31:03 -04:00

51 lines
2.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SVSim.Database.Migrations
{
/// <inheritdoc />
public partial class DropColosseumsTable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Colosseums");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Colosseums",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false),
CardPoolName = table.Column<string>(type: "text", nullable: false),
ColosseumId = table.Column<string>(type: "text", nullable: false),
ColosseumName = table.Column<string>(type: "text", nullable: false),
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
DeckFormat = table.Column<string>(type: "text", nullable: false),
EndTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
IsAllCardEnabled = table.Column<int>(type: "integer", nullable: false),
IsColosseumPeriod = table.Column<bool>(type: "boolean", nullable: false),
IsDisplayTips = table.Column<string>(type: "text", nullable: false),
IsNormalTwoPick = table.Column<string>(type: "text", nullable: false),
IsRoundPeriod = table.Column<bool>(type: "boolean", nullable: false),
IsSpecialMode = table.Column<string>(type: "text", nullable: false),
NowRound = table.Column<string>(type: "text", nullable: false),
SalesPeriodInfo = table.Column<string>(type: "jsonb", nullable: false),
StartTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
TipsId = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Colosseums", x => x.Id);
});
}
}
}