migration-workflow

Installation
SKILL.md

Migration Workflow

Core Principles

  1. Verify before applying — Always review generated migration SQL before applying to any database. dotnet ef migrations script shows the exact SQL. Never apply blindly.
  2. Rollback plan always — Every migration has a rollback. For EF Core: dotnet ef database update <PreviousMigration>. For packages: git revert. For .NET version: branch-based rollback. Document the rollback before applying.
  3. Test after migration — Run the full test suite after every migration step. Migrations that break tests are not complete. Integration tests with Testcontainers catch real database issues.
  4. One change per migration — Each EF Core migration should represent a single logical change (add table, rename column, add index). Multiple unrelated changes in one migration make rollback impossible.
  5. Incremental updates — Update one package at a time, build, test. Update one target framework at a time, build, test. Never batch unrelated changes — when something breaks, you need to know which change caused it.

Patterns

EF Core Migration Workflow

Step-by-step workflow for creating and applying database migrations safely.

Installs
38
GitHub Stars
435
First Seen
Mar 13, 2026
migration-workflow — codewithmukesh/dotnet-claude-kit