review-bench/andresharpe_dotbot/create-migration
Claude Code and agent skill by review-bench/andresharpe_dotbot
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Create and manage database migrations with Entity Framework Core, including schema changes, data seeding, and rollback strategies
Install
npx vskill@latest install review-bench/andresharpe_dotbot/create-migrationSKILL.md
Create Database Migration
Guide for creating and managing database migrations with Entity Framework Core.
When to Use
- Adding new tables or entities
- Modifying existing schema (columns, indexes, constraints)
- Data migrations or seeding
- Renaming or removing tables/columns
Migration Workflow
1. Update Entity Model
2. Update DbContext
3. Create Migration
4. Review Generated Migration
Check Up() and Down() methods for correctness.
5. Apply Migration
Migration Best Practices
Naming Conventions
- Use descriptive, action-oriented names
- Good:
AddEmailColumnToUsers,CreateOrdersTable,AddIndexOnUserEmail - Bad:
Migration1,Update,Changes
Schema Changes
Adding Columns
Modifying Columns
Adding Indexes
Adding Foreign Keys
Data Migrations
When you need to migrate data alongside schema changes:
Seeding Data
Use model builder for static reference data:
Rollback Strategy
Always implement proper Down() methods:
Common Scenarios
Renaming Columns
Dropping Tables
Adding Composite Keys
SQLite-Specific Considerations
- Limited ALTER TABLE support
- No DROP COLUMN (requires table recreation)
- No ADD CONSTRAINT for foreign keys (must recreate table)
- Use EF Core migration auto-generation, it handles these limitations
Testing Migrations
- Apply migration to fresh database - Verify Up() works
- Roll back migration - Verify Down() works
- Apply on database with data - Verify no data loss
- Test constraints and indexes - Verify they work as expected
Common Pitfalls
- ❌ Not testing Down() method
- ❌ Breaking changes without data migration
- ❌ Making nullable→required without default values
- ❌ Forgetting to update seed data
- ❌ Not handling existing data when adding constraints
- ❌ Committing migrations without testing
Checklist
- [ ] Entity model updated
- [ ] DbContext configuration updated
- [ ] Migration generated with descriptive name
- [ ] Up() method reviewed and correct
- [ ] Down() method implements proper rollback
- [ ] Data migration included if needed
- [ ] Tested on local database
- [ ] Tested rollback
- [ ] No data loss with existing data
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingstacks/dotnet/recipes/skills/create-migration/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/review-bench/andresharpe_dotbot/create-migration)