Migrations and Seeding
Summary
Migration sequence, model snapshot, design-time support, and development-only seed behavior.
Audience
Backend engineers, database reviewers, architects, QA, support, operations, security reviewers, and product owners.
Overview
Two migrations are present. InitialPerformanceSchema creates the baseline logical model and indexes. AddAppraisalGoalDueDate adds the optional compatibility target-date field. The current snapshot includes both changes.
Confirmed persistence behavior
- PerformanceDbContextFactory supports design-time migration tooling but does not define a separate model.
- Startup automatically applies migrations only in the development environment unless locally suppressed.
- DevelopmentSeeder is development-only, checks for an existing seed cycle, and otherwise creates synthetic cycle/appraisal/goal state through domain methods.
- Seeding uses multiple SaveChanges calls and can create outbox events; it is not one atomic operation.
- No production migration runner, approval workflow, rollback runbook, or automated migration test project is present.
- No migration commands, generated statements, connection details, or seed identities are published here.
Classification
Implemented migrations and development seeding; production governance is Foundation.
Requires confirmation
Production migration ownership, backup/rollback procedure, release gates, seed governance, and drift detection require confirmation.
Diagram
Related Articles
See Also
Keywords
- Performance persistence
- Migrations and Seeding
- Draft database documentation
Source References
microservices/src/performance-service/Infrastructure/Migrations/20260707172254_InitialPerformanceSchema.csmicroservices/src/performance-service/Infrastructure/Migrations/20260708090838_AddAppraisalGoalDueDate.csmicroservices/src/performance-service/Infrastructure/Migrations/PerformanceDbContextModelSnapshot.csmicroservices/src/performance-service/Infrastructure/Persistence.csmicroservices/src/performance-service/Infrastructure/DevelopmentSeeder.csmicroservices/src/performance-service/Program.cs
Revision Information
- Status: Draft
- Last reviewed: 2026-07-16
- Review cycle: Quarterly