Captured as a phase-02 review follow-up (IN-01 finding in .planning/phases/02-test-coverage/02-REVIEW.md and 02-REVIEWS.md). Backlog Phase 999.4 in ROADMAP.md.
Problem
RefreshTokenDbInfo declares its FK-to-user column as [Column(\"user_name\")] but stores a Guid user ID:
[Required]
[Column(\"user_name\")]
internal Guid UserId { get; }
The column name semantically says "user name" (string) but the type and content are a Guid (user ID). This is a pre-existing naming error on master, faithfully copied into the 02-09 raw-SQL schema bootstrap (DbCollectionFixture.ApplySchemaAsync creates user_name uuid NOT NULL).
No behavioral defect — purely a confusion-inducing schema label. Surfaces when reading the schema in pgAdmin, when authoring future EF migrations, and when the column name appears in logs / error messages.
Acceptance Criteria
- Rename
[Column(\"user_name\")] → [Column(\"user_id\")] in RefreshTokenDbInfo
- Add an EF Core migration that renames the column in production (and the raw-SQL bootstrap in
DbCollectionFixture should be updated to match)
- All existing tests should pass without functional changes
- Document the rename in
Docs/Testing/Coverage/ if any schema-aware tests reference the old name
Why deferred
EF Core migration generation is currently blocked on a ProjectVDbContext model-validation issue documented in 02-09-dal-integration-testcontainers-SUMMARY.md (Plan 02-09 fell back to raw-SQL CREATE TABLE in the test fixture). Once migration generation is unblocked, this rename is the natural first migration to bundle in.
Related
- Phase 2 review:
.planning/phases/02-test-coverage/02-REVIEW.md (IN-01)
- Phase 2 review summary:
.planning/phases/02-test-coverage/02-REVIEWS.md
- Migration blocker:
.planning/phases/02-test-coverage/02-09-dal-integration-testcontainers-SUMMARY.md
Captured as a phase-02 review follow-up (IN-01 finding in
.planning/phases/02-test-coverage/02-REVIEW.mdand02-REVIEWS.md). Backlog Phase 999.4 inROADMAP.md.Problem
RefreshTokenDbInfodeclares its FK-to-user column as[Column(\"user_name\")]but stores aGuiduser ID:The column name semantically says "user name" (string) but the type and content are a
Guid(user ID). This is a pre-existing naming error onmaster, faithfully copied into the 02-09 raw-SQL schema bootstrap (DbCollectionFixture.ApplySchemaAsynccreatesuser_name uuid NOT NULL).No behavioral defect — purely a confusion-inducing schema label. Surfaces when reading the schema in pgAdmin, when authoring future EF migrations, and when the column name appears in logs / error messages.
Acceptance Criteria
[Column(\"user_name\")]→[Column(\"user_id\")]inRefreshTokenDbInfoDbCollectionFixtureshould be updated to match)Docs/Testing/Coverage/if any schema-aware tests reference the old nameWhy deferred
EF Core migration generation is currently blocked on a
ProjectVDbContextmodel-validation issue documented in02-09-dal-integration-testcontainers-SUMMARY.md(Plan 02-09 fell back to raw-SQLCREATE TABLEin the test fixture). Once migration generation is unblocked, this rename is the natural first migration to bundle in.Related
.planning/phases/02-test-coverage/02-REVIEW.md(IN-01).planning/phases/02-test-coverage/02-REVIEWS.md.planning/phases/02-test-coverage/02-09-dal-integration-testcontainers-SUMMARY.md