skills/database-migration/SKILL.md
Manage database schema migrations for .NET applications. Covers EF Core migrations, naming conventions, rollback strategies, data seeding, migration testing, and CI/CD pipeline integration. Use when: creating migrations, handling schema changes, seeding data, testing migrations, or configuring migration pipelines.
npx skillsauth add congiuluc/my-awesome-copilot database-migrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
# From solution root
dotnet ef migrations add AddOrderStatus \
--project src/MyApp.Infrastructure \
--startup-project src/MyApp.Api \
--context AppDbContext
Naming Convention: {Action}{Entity}{Detail}
AddOrderStatus — adding a new columnCreateProductsTable — creating a new tableRenameUserEmailToEmailAddress — renaming a columnAddIndexOnOrderDate — adding an indexBefore applying any migration:
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Category>().HasData(
new Category { Id = "cat-1", Name = "Electronics" },
new Category { Id = "cat-2", Name = "Clothing" }
);
}
HasData() for reference data that rarely changes.IDataSeeder service called at startup.| Change | Safe? | Strategy | |--------|-------|----------| | Add column (nullable) | ✅ | Direct add | | Add column (non-nullable) | ⚠️ | Add with default value | | Rename column | ⚠️ | Add new → migrate data → drop old | | Drop column | ⚠️ | Remove code refs first → migrate → drop | | Change column type | ❌ | Add new → migrate data → drop old | | Drop table | ❌ | Ensure no references → backup → drop |
# In GitHub Actions workflow
- name: Validate EF Migrations
run: |
dotnet ef migrations script \
--project src/MyApp.Infrastructure \
--startup-project src/MyApp.Api \
--idempotent \
--output migrations.sql
dotnet ef database update directly in production.EnsureCreated() in production (bypasses migration history)dotnet ef database update on production directlytools
Build VS Code extensions with TypeScript. Covers extension anatomy, activation events, commands, tree views, webview panels, language features, testing, and publishing. Use when: creating a new VS Code extension, adding commands/views/providers, building webview UIs, implementing language server features, testing extensions, or packaging for the marketplace.
development
Track implementations, features, bugs, and releases in a versioning document. Use when: adding a commit, completing a feature, fixing a bug, or preparing a release. Automatically updates CHANGELOG.md following Keep a Changelog format and Semantic Versioning.
development
Write frontend tests using Vitest and React Testing Library. Use when: testing React components, hooks, user interactions, form submissions, accessibility assertions, or mocking API services.
development
Write Angular frontend tests using Jasmine, Karma, and Angular TestBed. Use when: testing Angular components, services, pipes, directives, user interactions, form submissions, accessibility assertions, or mocking HTTP services.