What problem does it solve?
It prevents broken or missing database changes when you modify EF Core entities by ensuring migrations are generated from the correct, freshly-built model snapshot and applied through the project’s dedicated migration pipeline.
Core Features & Use Cases
- Centralized, per-module migrations: Writes migrations into a single migrations project, organized by module/context folders (e.g., Catalog/, Identity/).
- Correct migration context targeting: Uses the right
--context {X}DbContext and outputs to the matching module folder with --output-dir {X}.
- Safety-first workflow: Encourages building before
migrations add, generating idempotent SQL for review, and applying via the DbMigrator (not API startup).
- Typical use case: You change an entity or EF configuration in a module and need a new migration that updates only the relevant module’s schema in a multi-tenant setup.
Quick Start
Run the migration creation command for your module’s DbContext, ensuring you use the Migrations project, the API host as startup project, the correct --context {X}DbContext, and --output-dir {X} to place the migration in the right folder.