Migrations
Command Pattern
Always target the Infra project with the Web startup project.
dotnet ef migrations add <MigrationName> --project src/xTrakt.Platform.Infra --startup-project src/Web
dotnet ef database update --project src/xTrakt.Platform.Infra --startup-project src/Web
Review Checklist
- Confirm entity mappings use
snake_casetable and column names. - Confirm list and get queries filter tenant data.
- Confirm soft-deleted records are excluded from reads.
- Confirm audit fields are populated through the shared interceptor.
- Review generated migration SQL before applying it to shared environments.