dotnet/efcore

migrations

Implementation details for EF Core migrations. Use when changing MigrationsSqlGenerator, model diffing, migration operations, HistoryRepository, the Migrator or related classes.

First seen Mar 30, 2026

Installation

$ npx skills add dotnet/efcore --skill migrations

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from dotnet/efcore · top by installs.

npx skills add dotnet/efcore

Browse all from dotnet/efcore

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 14.8K
License LICENSE.txt
Default branch main
Open issues 2,312
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,278 B
  • docs SUMMARY.md 195 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 32 installs

SKILL.md

Migrations

Pipeline

Add migration: MigrationsScaffolder.ScaffoldMigration()MigrationsModelDiffer.GetDifferences() → list of MigrationOperationCSharpMigrationsGenerator and CSharpSnapshotGenerator produce Up/Down/Snapshot code

Apply migration: Migrator.MigrateAsync() → reads __EFMigrationsHistory → per pending: MigrationsSqlGenerator.Generate(operations)MigrationCommandExecutor executes

Model Snapshot

  • Model snapshots use typeof(Dictionary<string, object>) (property bag format), not the actual CLR type. When examining the ClrType in a snapshot, don't assume it matches the real entity type.
  • SnapshotModelProcessor.Process() is used at design-time to fixup older model snapshots for backward compatibility.

Testing

Migration operation tests: test/EFCore.Relational.Tests/Migrations/. Functional tests: test/EFCore.{Provider}.FunctionalTests/Migrations/. Model differ tests: test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTest*.cs.