Update docs for microservices architecture

This commit is contained in:
Alexa
2026-06-15 23:35:30 +03:00
parent 27c01c3a80
commit 3ea951eb40
6 changed files with 363 additions and 261 deletions
+6 -5
View File
@@ -6,8 +6,9 @@
(generated by `dotnet ef migrations add Initial` against the
current entity model — captures all 67 `DbSet<>` tables).
- **`LegacyUpgrades.cs`** holds idempotent data transforms that can't
be derived from the entity model. Runs once per server boot, after
EF migrations complete and before `RoomService.SeedAsync()`.
be derived from the entity model. Runs during host boot for the
standalone server and for service-slice containers, after schema
bootstrap completes and before `RoomService.SeedAsync()`.
## What changed in the consolidation
@@ -37,8 +38,8 @@ Both were collapsed in 2026-05-25:
## Production cutover (one-time SQL)
Existing prod databases need a one-time fixup to tell EF "the new
Initial is already applied here" so the next boot doesn't try to
`CREATE TABLE` over existing data.
Initial is already applied here" so the next standalone or service-slice
boot doesn't try to `CREATE TABLE` over existing data.
### Postgres path
@@ -48,7 +49,7 @@ table exists** because EF Core only creates it when `Migrate()` runs.
Postgres continues to use `EnsureCreated()` post-consolidation, so
there's *nothing to do* — `EnsureCreated()` reads the entity model,
sees the schema already matches, and no-ops. Just deploy the new
build.
standalone image or microservices compose stack.
If you ever switch the Postgres path to `Migrate()`, run this once
before the cutover deploy: