Create Database Migration
Helps with creation, database, migration as part of working with databases and data persistence workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add create-database-migration npx -- -y @trustedskills/create-database-migration
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"create-database-migration": {
"command": "npx",
"args": [
"-y",
"@trustedskills/create-database-migration"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill generates SQL migration scripts to safely alter your database schema. It handles creating new tables, modifying existing columns, and managing foreign key constraints based on your specific requirements.
When to use it
- You need to add a new column to an existing table without losing current data.
- You are refactoring your schema by splitting one large table into multiple related tables.
- You require a reversible migration script for testing or deployment pipelines.
- You want to ensure foreign key relationships are defined correctly during schema changes.
Key capabilities
- Generates standard SQL
ALTER TABLEstatements for column modifications. - Creates new table definitions with appropriate data types and constraints.
- Handles complex operations like adding foreign keys and indexes.
- Produces migration files suitable for frameworks like Knex or raw SQL execution.
Example prompts
- "Create a database migration to add an
email_verifiedboolean column to the users table." - "Write a migration script to split the
orderstable intoorder_itemsandorder_headerswith proper foreign keys." - "Generate a migration to rename the
usernamecolumn tohandlein the accounts table and update existing values."
Tips & gotchas
Ensure your AI agent knows the current schema structure, as it cannot infer existing columns or constraints without that context. Always review generated SQL before running it in production, especially when altering data types or removing columns, as these operations can be destructive.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.