add-migration

Create EF Core migrations for microservice database contexts with dotnet ef.

2|Updated Dec 9, 2025
One-click install
npx skills add https://github.com/signalbeam-io/signalbeam-edge --skill add-migration-signalbeam-io
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-migration
Source: https://github.com/signalbeam-io/signalbeam-edge/tree/main/.claude/skills/add-migration
Command: npx skills add https://github.com/signalbeam-io/signalbeam-edge --skill add-migration-signalbeam-io

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates creating EF Core migrations for a microservice's database context to keep schemas in sync with code.

Core Features & Use Cases

  • Generates migrations for multiple services by name and maps to the correct DbContext and Infrastructure project.
  • Validates entity configurations exist before migration creation and provides guidance to review.
  • Use Case: When adding a new table or changing a model in a service, run the command to scaffold a corresponding migration.

Quick Start

From the Infrastructure project directory, run the migration command to create a new migration file for the chosen service.

Frequently Asked Questions about add-migration

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

FAQPage Schema
How do I generate EF Core migrations for a specific microservice database context?

To generate EF Core migrations for a microservice, run the migration command from the Infrastructure project directory, which scaffolds the migration and stores the output in the Persistence/Migrations folder.

How does dotnet ef migrations add work when mapping to the correct DbContext in a microservice architecture?

The process maps the migration to the correct Infrastructure project and DbContext by using the appropriate --project and --startup-project paths, ensuring consistent schema evolution across multiple named services.

Do I need entity configurations to exist before creating an EF Core migration?

Yes, entity configurations must exist before creating an EF Core migration. The process validates that these configurations are present beforehand and provides guidance to review them before scaffolding the schema changes.

Can I scaffold database schema changes for multiple services by name?

Yes, you can scaffold database schema changes for multiple services by specifying the service name, which automatically targets the correct DbContext and Infrastructure project to keep schemas in sync with code.

What is the best way to keep microservice database schemas in sync with code changes?

Automating EF Core migration creation keeps microservice database schemas in sync with code changes by validating entity configurations and generating migration files in the correct project paths when models are updated.