Database Migration Generator

🌐Community
by ntaksh42 · vlatest · Repository

Helps with 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.

1

Run in terminal (recommended)

terminal
claude mcp add database-migration-generator npx -- -y @trustedskills/database-migration-generator
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "database-migration-generator": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/database-migration-generator"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

The database-migration-generator skill automatically generates SQL migration scripts based on provided schema definitions or changes. It can handle creating new tables, modifying existing ones (adding/removing columns), and generating rollback scripts for safe deployments. This reduces manual effort and potential errors in database evolution processes.

When to use it

  • Database Schema Updates: When you need to update your database structure due to application requirements or feature additions.
  • Automated Deployments: Integrate into CI/CD pipelines to automate the process of applying schema changes across environments.
  • Refactoring Existing Databases: Generate migration scripts for transitioning a legacy database to a newer version or design.
  • Team Collaboration: Standardize database change management and ensure consistency among developers working on different parts of an application.

Key capabilities

  • Generates SQL migration scripts (up and down/rollback)
  • Handles table creation, modification, and deletion
  • Supports adding and removing columns with various data types
  • Creates rollback scripts to revert changes safely

Example prompts

  • "Generate a migration script to add a 'users' table with columns: id (integer primary key), name (varchar(255)), email (varchar(255) unique)."
  • "Create a migration to remove the 'old_column' from the 'products' table."
  • “Generate migrations for adding an index on the email column of the users table.”

Tips & gotchas

The skill requires clear and precise schema definitions as input. Ambiguous or incomplete information will result in inaccurate migration scripts, so be sure to provide all relevant details about your desired database changes.

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 HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
ntaksh42
Installs
6

🌐 Community

Passed automated security scans.