managing-database-migrations

Installation
SKILL.md

Database Migration Manager

Overview

Create, validate, and execute database schema migrations with full rollback support across PostgreSQL, MySQL, and MongoDB.

Prerequisites

  • Database credentials with DDL permissions (CREATE, ALTER, DROP TABLE)
  • Migration framework installed and configured (Flyway, Alembic, Prisma, Knex, or raw SQL versioning)
  • Version control for migration files (Git repository)
  • Access to a staging database matching production schema for testing migrations
  • psql or mysql CLI for executing and verifying migrations
  • Current schema baseline documented or captured via pg_dump --schema-only

Instructions

  1. Capture the current schema state before making changes. Run pg_dump --schema-only -f schema_before.sql (PostgreSQL) or mysqldump --no-data > schema_before.sql (MySQL) to create a reference point.

  2. Define the desired schema change clearly: specify table name, column additions/removals/modifications, constraint changes, and index updates. Document whether the change is additive (safe) or destructive (requires data migration).

Related skills
Installs
2
GitHub Stars
2.2K
First Seen
Mar 21, 2026