database-migrations

Coordinate reversible database schema changes across PostgreSQL, MySQL, and ORMs.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/cescrafli/compyrasion --skill database-migrations-cescrafli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/cescrafli/compyrasion/tree/main/skills/database-migrations
Command: npx skills add https://github.com/cescrafli/compyrasion --skill database-migrations-cescrafli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migrations are essential for applying schema changes and data transformations safely in production. This guide consolidates best practices, patterns, and checklists to ensure changes are repeatable, auditable, and rollback-friendly across PostgreSQL, MySQL, and popular ORMs.

Core Features & Use Cases

  • Migration safety checklist (UP/DOWN, defaults, non-blocking indexes)
  • Zero-downtime patterns (expand-contract, non-locking operations)
  • Cross-ORM guidance (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate)
  • Structured workflows for adding/renaming/removing columns and backfills

Quick Start

Perform a safety-first migration plan by reviewing the current schema, writing separate up/down migrations, and validating on a copy of production data before deploying.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I perform zero-downtime database migrations in PostgreSQL and MySQL?

Zero-downtime database migrations use expand-contract patterns and non-locking operations to apply schema changes safely. This approach coordinates reversible changes across PostgreSQL and MySQL without blocking production traffic.

What is the best way to manage database schema changes with ORMs like Prisma or Django?

Managing database schema changes with ORMs requires structured workflows for adding, renaming, or removing columns. Cross-ORM guidance covers Prisma, Drizzle, Kysely, Django, TypeORM, and golang-migrate to ensure reproducible deployments.

How do I safely backfill data during a database migration without locking tables?

Safe data backfill during database migration involves validating changes on a copy of production data first. Following a migration safety checklist ensures operations like non-blocking indexes and structured backfills execute without locking tables.

Does this database migration approach support rollback workflows for production schema changes?

Yes, rollback workflows for production schema changes are supported through separate UP and DOWN migrations. This ensures database migrations are reversible and auditable across PostgreSQL, MySQL, and popular ORMs.