refactor: align ScannerDbContext with sibling *Context naming - #379
Merged
Conversation
Rename ScannerDbContext -> ScannerContext so all three DbContext subclasses share one convention (PoracleContext, PoracleWebContext, ScannerContext). #232 had renamed RdmScannerContext -> ScannerDbContext and introduced the odd-one-out Db infix; this restores the pattern. Touches the class and its file, the DbContextOptions<> type argument, the ScannerService ctor parameter and field, the AddDbContext<> registration, and the two doc mentions. No functional change: IScannerService is unchanged, the optional ConnectionStrings:ScannerDb key is unchanged, and no EF migrations are involved (the scanner DB is read-only and never migrated by PoracleWeb).
hokiepokedad2
force-pushed
the
refactor/240-scanner-context-naming
branch
from
August 5, 2026 13:59
003fe70 to
42c26cb
Compare
hokiepokedad2
added a commit
that referenced
this pull request
Aug 5, 2026
The v2.12.0 release cut failed at "Enable auto-merge": X Cannot use `-d` or `--delete-branch` when merge queue enabled `main` gained a merge queue in #378/#379, and gh rejects the flag outright rather than ignoring it, so the step exited 1 and the whole workflow failed. The changelog PR itself was created and approved fine -- only the arming failed. The flag was redundant regardless: peter-evans/create-pull-request above already sets `delete-branch: true`, which removes the branch once the PR closes. --squash is kept even though the queue now dictates the merge strategy (gh warns about it) so the intent still reads correctly if the queue is ever removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #240.
What
Renames
ScannerDbContext→ScannerContextso all threeDbContextsubclasses share one convention:PoracleContextPoracleContextPoracleWebContextPoracleWebContextScannerDbContextScannerContextA bit of history: #232 renamed
RdmScannerContext→ScannerDbContextand is where the odd-one-outDbinfix came from. This restores the pattern that rename broke.Changed
Data/Pgan.PoracleWebNet.Data.Scanner/ScannerDbContext.cs→ScannerContext.cs(class +DbContextOptions<>type argument). Done withgit mv, so the rename is detected at 83% similarity andgit blamefollows through.Core/Pgan.PoracleWebNet.Core.Services/ScannerService.cs— ctor parameter and_contextfield type.Applications/Pgan.PoracleWebNet.Api/Configuration/ServiceCollectionExtensions.cs:104—AddDbContext<ScannerContext>in the optional-registration block.docs/architecture/database.md,CLAUDE.md— the two doc mentions.CHANGELOG.md— entry under Unreleased → Changed.Two corrections to the issue's suggested-fix list
docs/architecture/backend.mdneeds no change — it discussesScannerService/ScannerGymEntitybut never names the context type.CLAUDE.md's file-paths table row points at the directoryData/Pgan.PoracleWebNet.Data.Scanner/, not the class, so it stays as-is.No functional change
IScannerServiceis untouched — DI consumers resolve the interface.ConnectionStrings:ScannerDbconfig key is unchanged, so self-hosters need to do nothing.Pgan.PoracleWebNet.Data.Scannerstays).Verification
grep -rni scannerdbcontextacross the repo returns only the two historicalCHANGELOG.mdlines (this entry and Rename Rdm* scanner types to generic Scanner*; use Golbat in examples #232's), which are correctly left alone.docs/to the renamed heading's old anchor (#scannerdbcontext-optional).dotnet build— 0 errors, warning count unchanged frommain.dotnet test— 1441/1441 passing.ScannerControllerTestsmocksIScannerService, so no test needed updating.dotnet format --verify-no-changeson the three changed C# files — clean.ClientApp/src/**/*.{ts,html,scss}and this diff touches no frontend file.