dotnet:migration-check

Validate Entity Framework Core database migrations for downtime and data loss risks.

2|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/dimsour/dotnet-ai-toolkit --skill dotnet-migration-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet:migration-check
Source: https://github.com/dimsour/dotnet-ai-toolkit/tree/main/plugins/dotnet/skills/migration-check
Command: npx skills add https://github.com/dimsour/dotnet-ai-toolkit --skill dotnet-migration-check

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Ensures that Entity Framework Core database migrations do not introduce downtime or data loss by checking for destructive operations, potential downtime risks, and backward compatibility issues.

Core Features & Use Cases

  • Destructive Operation Detection: Identifies dropped columns, NOT NULL additions without defaults, and data-destructive renames that can break your application.
  • Downtime Risk Assessment: Evaluates risks associated with adding indexes to large tables, foreign key additions, and computed columns that require full table rewrites.
  • Backward Compatibility Checks: Ensures that the migrations can be reversed successfully and do not violate existing data integrity.
  • Use Case: Before deploying a new migration, this Skill provides a report detailing the changes, risks, and recommended steps to minimize impact on your database.

Quick Start

Use the dotnet:migration-check skill to validate your migration file 'AddNewColumnsAndForeignKey.cs'.

Frequently Asked Questions about dotnet:migration-check

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

FAQPage Schema
How do I check EF Core migrations for downtime risks before deploying?

To check EF Core migrations for downtime risks, you validate the migration file to identify destructive operations like dropped columns, NOT NULL additions without defaults, and data-destructive renames that can break your application.

What database migration changes can cause data loss in Entity Framework Core?

Database migration changes that cause data loss in Entity Framework Core include dropped columns, data-destructive renames, and NOT NULL additions without default values, which this validation process detects and categorizes for review.

How do I validate backward compatibility for EF Core database migrations?

Validating backward compatibility for EF Core database migrations involves ensuring migrations can be reversed successfully and do not violate existing data integrity, preventing application breaks during deployment.

Do I need the EF Core CLI to validate database migration files?

Yes, you need the EF Core CLI to validate database migration files, as it manages migration states and applies changes within a controlled environment to assess downtime and data loss risks.

What is the best way to prevent downtime when adding indexes to large tables in EF Core?

The best way to prevent downtime when adding indexes to large tables in EF Core is to run a downtime risk assessment that evaluates operations requiring full table rewrites and provides recommended mitigation steps.

Why does adding a foreign key in EF Core migration require a downtime risk assessment?

Adding a foreign key in EF Core migration requires a downtime risk assessment because foreign key additions and computed columns can require full table rewrites, potentially causing significant downtime and backward compatibility issues.