db-schema-management

Manage database schema changes with EF Migrations workflows.

1|Updated Jun 27, 2025
One-click install
npx skills add https://github.com/d-kishi/ubiquitous-lang-mng --skill db-schema-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-schema-management
Source: https://github.com/d-kishi/ubiquitous-lang-mng/tree/main/.claude/skills/db-schema-management
Command: npx skills add https://github.com/d-kishi/ubiquitous-lang-mng --skill db-schema-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

EF Migrationsを用いたデータベーススキーマ変更の実装パターンとワークフローを提供します。

Core Features & Use Cases

  • 5ステップのスキーマ変更ワークフロー
  • CHECK制約・手動SQL追加のパターン
  • データベース設計書同期チェックリストの活用

Quick Start

Entity定義変更 → Migration作成 → Migration適用 → DB設計書更新の順に実行します。

Frequently Asked Questions about db-schema-management

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

FAQPage Schema
How do I manage database schema changes using EF Migrations?

EF Migrations automates schema change management by tracking entity modifications, generating migration files, and applying them to your database. Define entity changes, run `dotnet ef migrations add`, review the generated migration code, then execute `dotnet ef database update` to sync your database with the new schema.

Can I add CHECK constraints and PostgreSQL-specific features in EF Migrations?

Yes. EF Migrations supports CHECK constraints through `HasCheckConstraint()` in model configuration and PostgreSQL features like GIN/BRIN indexes and COMMENT annotations via `Fluent API`. For advanced features, integrate raw SQL within migration `Up()` and `Down()` methods.

What's the workflow for modifying columns and creating new tables with EF Migrations?

The standard workflow is: modify your entity definitions, create a migration with `dotnet ef migrations add [MigrationName]`, verify the generated migration handles column additions or table creation correctly, then apply it with `dotnet ef database update`. Document changes in your database design files afterward.

How do I keep my database design documentation in sync with EF Migrations?

Use a schema-document synchronization checklist after each migration: review generated migration files for accuracy, update your design documentation to reflect new tables, columns, and constraints, and verify PostgreSQL-specific properties are captured. This prevents drift between code and documentation.

Can I write custom SQL within EF Migrations for complex schema changes?

Yes. EF Migrations allows manual SQL injection: use `migrationBuilder.Sql()` in the `Up()` method for custom operations and `migrationBuilder.Sql()` in `Down()` to reverse them. This enables complex transformations, data seeding, or PostgreSQL-specific DDL statements beyond EF's standard capabilities.

Do I need to manually manage migrations or does EF Migrations automate the process?

EF Migrations automates most operations: it generates migration files from entity changes and applies schema updates. However, you must manually review generated migrations for correctness, decide when to create snapshots, and ensure `Down()` methods properly reverse changes for rollback scenarios.