Use local dotnet-ef tooling and strict EF migration checks

This commit is contained in:
2026-02-26 08:57:02 +01:00
parent 5763c67f34
commit 2d0df7948c
11 changed files with 470 additions and 71 deletions

9
FAQ.md
View File

@@ -30,6 +30,15 @@ To start with a clean backend state, stop the app and remove the corresponding S
Usually no. Startup now uses EF Core migration-based schema upgrades (`Database.Migrate`) and applies pending migrations automatically.
## How do I add a new EF migration in this repo?
Use the repo-local tool manifest:
```powershell
dotnet tool restore
dotnet dotnet-ef migrations add <MigrationName> --project RpgRoller/RpgRoller.csproj --startup-project RpgRoller/RpgRoller.csproj
```
## Does the backend read SQLite on every API call?
No. The backend loads state from SQLite once during startup into in-memory state and serves requests from memory. Successful state mutations are then written back to SQLite.