mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
81698180dd
Adding entity columns and an EF migration was not enough, and the gap took down a live dev server: club home, matchmake/dorm, the presence heartbeat and the chat thread list all returned 500 with "column does not exist". The Postgres path is EnsureCreated-only and never replays migrations, so an EF migration adds nothing to a database that already exists. Every post-Initial column has to be repeated as an idempotent ALTER in DatabaseBootstrap — that is what the existing Ensure*Columns helpers are for — and the columns added by the 2023 wire work had no such helper. Observed failures, all from a running deployment: - PrivateInstances.RoomCode -> PrivateInstanceService.EnsureForDormAsync, which is on the path of BOTH matchmake/dorm and player/heartbeat. This is why the client could not load into the dorm at all. - Clubs.ClubChatEnabled / MinLevel -> ClubService.HomeClubAsync, so GET club/home/me 500'd on every boot. - ChatMessages.ModerationState -> ChatController.GetThreads, so the chat inbox 500'd. EnsureClient2023WireColumnsAsync covers all of them plus the playlist settings columns and the two new club tables, for Postgres and SQLite, and runs after the provider branch so both get it. Every statement is idempotent, so it is a no-op on a fresh database that EnsureCreated already built correctly. The test suite did not catch this because tests always run against a fresh database, where EnsureCreated builds the full model from the entities. Only an EXISTING database can be missing these columns.