Backend Migrations

Create and manage reversible database migrations across Alembic, ActiveRecord, Prisma Migrate, and Flyway.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/dpietersz/pietersz.me --skill backend-migrations-dpietersz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Backend Migrations
Source: https://github.com/dpietersz/pietersz.me/tree/main/.claude/skills/backend-migrations
Command: npx skills add https://github.com/dpietersz/pietersz.me --skill backend-migrations-dpietersz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides structured guidance to create, manage, and rollout database migrations with reversible changes, version control, and zero-downtime deployment strategies.

Core Features & Use Cases

  • Create and edit migration files across different tooling ecosystems (Alembic, ActiveRecord, Prisma Migrate, Flyway) with proper up/down methods.
  • Enforce backward-compatible schema changes, safe rollbacks, and versioned migrations in multiple environments.
  • Support planning and executing zero-downtime deployments and separating schema changes from data migrations.

Quick Start

Generate a safe, reversible migration plan to add a new column to the users table.

Frequently Asked Questions about Backend Migrations

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

FAQPage Schema
How do I create a reversible database migration with zero-downtime deployment?

To create a reversible database migration with zero-downtime deployment, you generate migration files with proper up/down methods, enforce backward-compatible schema changes, and separate schema changes from data migrations to avoid locking during rollout.

How do I safely rollback a schema change in Alembic or Prisma Migrate?

You can safely rollback a schema change in Alembic or Prisma Migrate by editing existing migration files to include proper down methods, ensuring that removing tables, columns, or indexes is fully reversible across your version-controlled environments.

What is the best way to separate schema changes from data migrations?

The best way to separate schema changes from data migrations is to enforce backward-compatible changes and versioning, isolating structural modifications from data transformations to enable safe rollbacks and zero-downtime deployments across your database environments.

Does this approach support database migrations across both ActiveRecord and Flyway?

Yes, this approach supports database migrations across both ActiveRecord and Flyway, allowing you to create new migrations, add or remove tables and columns, and create indexes while enforcing safe rollbacks and version control across multiple tooling ecosystems.

Why do I need to enforce backward-compatible schema changes during a deployment?

You need to enforce backward-compatible schema changes during a deployment to ensure that older application versions can still interact with the database, which is critical for executing zero-downtime strategies and guaranteeing safe, reversible rollbacks.

When should I not use a zero-downtime database migration strategy?

You should avoid a zero-downtime database migration strategy when performing destructive, non-backward-compatible schema changes that cannot be separated from data migrations, as these operations prevent safe rollbacks and risk locking the database.