create-migration

Creates Entity Framework Core database migrations from C# entity and DbContext changes.

53|27|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/andresharpe/dotbot-v3 --skill create-migration-andresharpe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-migration
Source: https://github.com/andresharpe/dotbot-v3/tree/main/profiles/dotnet/prompts/skills/create-migration
Command: npx skills add https://github.com/andresharpe/dotbot-v3 --skill create-migration-andresharpe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating, applying, and managing database schema changes using Entity Framework Core, ensuring data integrity and version control.

Core Features & Use Cases

  • Automated Migration Generation: Creates migration scripts based on C# entity and DbContext changes.
  • Schema Modification: Handles adding, altering, and dropping tables, columns, and indexes.
  • Data Seeding & Migration: Supports migrating existing data and seeding reference data.
  • Rollback Strategy: Ensures proper Down() methods are implemented for reversibility.
  • Use Case: When you add a new Email property to your User entity and update the AppDbContext, this Skill will generate the necessary EF Core migration to add the corresponding column to your database table.

Quick Start

Use the create-migration skill to add a new database migration for your Entity Framework Core project.

Frequently Asked Questions about create-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create EF Core database migrations for schema changes in C#?

EF Core database migrations are generated by analyzing C# entity and DbContext changes to automatically create scripts for adding, altering, or dropping database tables, columns, and indexes.

What's the best way to handle data seeding and rollback strategies in Entity Framework Core?

Data seeding and rollback strategies in Entity Framework Core are managed by implementing proper Down methods for reversibility and configuring migration scripts to migrate existing data and seed reference data.

Do I need .NET CLI and EF Core tools to manage database schema evolution?

Yes, .NET CLI and EF Core tools are required to execute the automated script generation and apply schema evolution processes for managing your Entity Framework Core database migrations.

Can I update my AppDbContext and automatically generate migration scripts for new properties?

Yes, when you add a new property like Email to a User entity and update AppDbContext, this process generates the necessary EF Core migration to add the corresponding column to your database table.

What are the limitations of managing database schema modifications through Entity Framework Core?

Managing database schema modifications through Entity Framework Core relies on accurate DbContext mapping, and complex schema alterations or data migrations may require manual script adjustments to ensure data integrity.

When do I need to generate a database migration for my .NET project?

You need to generate a database migration for your .NET project when you modify C# entity classes or DbContext definitions and want to synchronize those schema changes with the underlying database safely.