EF Core — workflow de migrationsEF Core — migration workflow

Le skill /efcore couvre le cycle de vie complet des migrations Entity Framework Core sur un projet généré SmartStack (dual context : CoreDbContext + ExtensionsDbContext) ou sur le Studio (single context, providers Sqlite / Postgres / SqlServer). The /efcore skill covers the full Entity Framework Core migration lifecycle on a generated SmartStack project (dual context: CoreDbContext + ExtensionsDbContext) or on the Studio (single context, Sqlite / Postgres / SqlServer providers).

Routing des opérationsOperation routing

IntentionIntent Agent CLI
Lister les migrationsList migrations agents/list.md cli/list
État (pending / applied)Status (pending / applied) agents/status.md cli/status
Créer une migrationCreate a migration agents/create.md cli/create
Compresser avant mergeSquash before merge agents/squash.md cli/squash
Rebase snapshotRebase snapshot agents/rebase-snapshot.md cli/rebase-snapshot
Appliquer (dotnet ef database update)Apply (dotnet ef database update) agents/db-update.md

Convention de nommageNaming convention

Toutes les migrations suivent le pattern {prefix}v{version}{seq3}{Description}, calculé par cli/lib/migration-name.ts : All migrations follow the pattern {prefix}v{version}{seq3}{Description}, computed by cli/lib/migration-name.ts:

Core_v5_0_0_001_AddInitialSchema
Ext_v5_0_0_002_AddInvoiceTable
TokenToken SourceSource
prefix Core / Ext / Sqlite / Postgres / SqlServer
version depuis .csproj (PackageVersion)from .csproj (PackageVersion)
seq3 numérotation séquentielle à 3 chiffres3-digit sequential numbering
Description PascalCasePascalCase

Détection automatiqueAutomatic detection

Le CLI détecte automatiquement la structure : The CLI auto-detects the structure:

  • App générée : 2 contextes, 2 fichiers de migrations.Generated app: 2 contexts, 2 migration files.
  • Studio : 1 contexte, 3 projets de migrations (un par provider).Studio: 1 context, 3 migration projects (one per provider).

Plus aucune dépendance MCP — cli/lib/ef-runner.ts appelle dotnet ef directement. No more MCP dependency — cli/lib/ef-runner.ts calls dotnet ef directly.

Skills disponibles

Available Skills

infrastructure

/efcore infrastructure

EF Core migration workflow — create, squash, rebase-snapshot, apply, list, status. Applies the best practices of the global /efcore agents without MCP or external dependencies. Works against a single-assembly generated app (CoreDbContext + ExtensionsDbContext) or the multi-assembly Studio (StudioDbContext with Sqlite / Postgres / SqlServer migration projects).