Add EF design-time factories; fix Game migration; document DB ops

- DesignTimeFactories.cs: adds IDesignTimeDbContextFactory<T> for all
  6 contexts so dotnet-ef tools work without starting the full ASP.NET
  host (previously failed because Redis/NATS aren't available locally)
- SOR.Host.csproj: adds Microsoft.EntityFrameworkCore.Design (PrivateAssets=all)
  as the EF design-time host still requires it in the startup project
- Game/AddGameRulesAndCustomLobby: emptied Up/Down — migration was generated
  with a stale snapshot duplicating InitialCreate tables; actual GameRuleSet
  and CustomLobby schema is in AddBoardDimensions
- deploy/database-migrations.md: documents how to apply/add migrations
  against any environment; records pg-forge-01 state as of 2026-02-27

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-02-27 09:32:30 -05:00
co-authored by Claude Happy
parent 8a9ccdba5e
commit fe5cd2d424
4 changed files with 264 additions and 126 deletions
+7
View File
@@ -9,6 +9,13 @@
</PropertyGroup>
<ItemGroup>
<!-- EF Core design-time tools — required for 'dotnet ef database update' to work
when SOR.Host is the startup project. PrivateAssets=all = dev-only, not in output. -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<!-- Infrastructure clients — registered once in Host, shared by all services -->
<PackageReference Include="StackExchange.Redis" />
<PackageReference Include="NATS.Net" />