Sql Migration Generator

🌐Community
by jeremylongshore · vlatest · Repository

Provides migration guidance and assistance for working with databases and data persistence.

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 sql-migration-generator npx -- -y @trustedskills/sql-migration-generator
2

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

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

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

About This Skill

What it does

The SQL Migration Generator skill creates SQL migration scripts based on provided database schema changes. It can generate the necessary up and down migrations, allowing for automated database version control. This facilitates safer deployments and rollbacks by applying or reverting changes in a controlled manner.

When to use it

  • Database Refactoring: Generate migration scripts when altering table structures, adding new columns, or changing data types.
  • Application Deployment: Automate the process of updating your database schema during application releases.
  • Rollback Scenarios: Easily revert database changes by generating down migrations to undo previous alterations.
  • Team Collaboration: Standardize database change management across development teams.

Key capabilities

  • Generates SQL migration scripts (up and down).
  • Handles schema modifications (table creation, column additions/removals).
  • Supports data type changes.
  • Automated version control for databases.

Example prompts

  • "Generate a migration to add a new 'email' column of type VARCHAR(255) to the 'users' table."
  • "Create a migration script that drops the 'old_table' table and renames it to 'new_table'."
  • “I need a migration to change the data type of the ‘quantity’ column in the ‘products’ table from INT to BIGINT.”

Tips & gotchas

The quality of generated SQL depends on the clarity and accuracy of the provided schema changes. Ensure you clearly define the desired modifications for optimal results.

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
jeremylongshore
Installs
14

🌐 Community

Passed automated security scans.