database-migration-generator

Generate SQL and TypeORM database migration scripts with rollback support.

1|1|Updated Nov 22, 2025
One-click install
npx skills add https://github.com/ntaksh42/agents --skill database-migration-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration-generator
Source: https://github.com/ntaksh42/agents/tree/main/.claude/skills/database-migration-generator
Command: npx skills add https://github.com/ntaksh42/agents --skill database-migration-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of database migration scripts, ensuring consistent and version-controlled database schema changes across different environments.

Core Features & Use Cases

  • SQL Script Generation: Creates UP scripts for table creation, column alterations, and index additions.
  • Rollback Scripts: Generates corresponding DOWN scripts to revert changes.
  • TypeORM Integration: Produces TypeScript migration files compatible with TypeORM.
  • Use Case: When adding a new users table with specific columns and indexes, this Skill can generate both the SQL CREATE TABLE statement and its corresponding DROP TABLE statement, or a TypeORM migration class.

Quick Start

Generate a SQL migration script to create a 'products' table with 'id', 'name', and 'price' columns.

Frequently Asked Questions about database-migration-generator

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

FAQPage Schema
How do I generate SQL migration scripts for schema creation and rollback?

To generate SQL migration scripts, you define the desired schema changes such as table creation or column alterations. The tool then outputs both UP scripts for applying changes and DOWN scripts for reverting them, ensuring version-controlled database schema management.

Can I use TypeORM to automate TypeScript migration file generation?

Yes, TypeORM migration file generation is fully supported. The tool produces TypeScript migration files implementing TypeORM migration interfaces, allowing you to automate schema modifications directly within your development workflow.

What is the best way to version control database schema changes across environments?

Versioning database schema changes is best handled by generating automated migration scripts. This approach creates consistent SQL DDL statements or TypeORM classes that can be tracked in version control, ensuring uniform schema states across different environments.

Does this database migration generator support both table alterations and index additions?

Yes, the database migration generator supports generating UP scripts for table creation, column alterations, and index additions. It simultaneously creates corresponding DOWN scripts to safely revert any of these structural database modifications.

How do I create a TypeORM migration class for a new products table?

To create a TypeORM migration class for a new products table, you specify the required columns like id, name, and price. The generator outputs a TypeScript file using TypeORM interfaces to handle the schema creation automatically.