Agents & OrchestrationSûr100100/100

Migrations (.NET)

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

ou envoie-le directement à ton agent.

Installer dans ton projet

$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs migrations__dotnet-dotnet__src-efcore-agents-skills-c9112c814be2
.NET
dotnet/dotnet
Contenu à copier
---
name: migrations
description: 'Implementation details for EF Core migrations. Use when changing MigrationsSqlGenerator, model diffing, migration operations, HistoryRepository, the Migrator or related classes.'
user-invocable: false
metadata:
  origin: .NET
---

# Migrations

## Pipeline

**Add migration**: `MigrationsScaffolder.ScaffoldMigration()` → `MigrationsModelDiffer.GetDifferences()` → list of `MigrationOperation` → `CSharpMigrationsGenerator` 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`.
Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.

Ce que fait Migrations (.NET)

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.

Comment utiliser Migrations (.NET)

1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.

Déclencheurs pour Migrations (.NET)

Dis simplement à ton agent quelque chose comme :

Applique le skill migrations__dotnet-dotnet__src-efcore-agents-skills-c9112c814be2 à cette tâche
Utilise migrations__dotnet-dotnet__src-efcore-agents-skills-c9112c814be2 pour améliorer cette implémentation
Passe en revue ce sujet avec migrations__dotnet-dotnet__src-efcore-agents-skills-c9112c814be2

Skills liés à Migrations (.NET)