database-migration

Generate timestamped up/down SQL migration files for schema changes.

196|11|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/alekspetrov/navigator --skill database-migration-alekspetrov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration
Source: https://github.com/alekspetrov/navigator/tree/main/skills/database-migration
Command: npx skills add https://github.com/alekspetrov/navigator --skill database-migration-alekspetrov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates creation of database migrations with up/down scripts and validation.

Core Features & Use Cases

  • Generate up/down migrations with timestamped files
  • Validate SQL syntax
  • Follow common migration conventions

Quick Start

Say "Create migration" with details to generate a migration.

Frequently Asked Questions about database-migration

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

FAQPage Schema
How do I create database migrations with rollback capability?

Database migrations are timestamped SQL files with up and down scripts that enable schema changes and rollbacks. This Skill generates migration files following conventions for Knex, Prisma, and TypeORM, automatically creating paired up/down scripts so you can apply or reverse schema modifications safely.

Can I use migrations to modify tables, columns, and indexes?

Yes, migrations handle all common schema operations: creating or dropping tables, adding or removing columns, defining constraints, and managing indexes. Each migration file contains the up script to apply changes and a down script to revert them if needed.

What validation does the migration generator perform?

The Skill validates SQL syntax, ensures unique timestamps on each migration file, and confirms proper up/down structure. It checks adherence to standard migration naming conventions so migrations integrate cleanly with your ORM or migration runner.

Does this work with Knex, Prisma, and TypeORM?

Yes, the migration generator integrates with Knex, Prisma, and TypeORM by following each framework's standard conventions for file naming, directory structure, and up/down function signatures.

How do I roll back a migration if something goes wrong?

Each generated migration includes a down script that reverses the changes from the up script. Run the down migration through your framework to safely revert schema modifications to the previous state.

Can I automate migration creation from prompts or triggers?

Yes, you can generate migrations by describing desired schema changes in a prompt. The Skill creates timestamped, validated migration files with matching up/down scripts based on your specifications.