database-migration-helper

Generate reversible database migrations with schema changes and data transformations.

7|2|Updated Nov 9, 2025
One-click install
npx skills add https://github.com/Prompt-or-Die-Labs/hyper-forge --skill database-migration-helper-prompt-or-die-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration-helper
Source: https://github.com/Prompt-or-Die-Labs/hyper-forge/tree/main/.claude/skills/database-migration-helper
Command: npx skills add https://github.com/Prompt-or-Die-Labs/hyper-forge --skill database-migration-helper-prompt-or-die-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fs/promises, path, bun, and includes scripts (resource) components.

What problem does it solve?

It solves the risk and tedium of changing database schemas by providing structured, rollback-capable migration patterns across common migration frameworks.

Core Features & Use Cases

  • Safe schema changes with rollback: Create migrations that include both up (apply) and down (revert) logic to keep deployments reversible.
  • Data migrations alongside schema updates: Perform transformations (e.g., backfilling or converting column values) within the same migration flow.
  • Cross-ORM/stack templates: Use provider-specific guidance and templates for Prisma, TypeORM, Alembic (Python), Sequelize, or raw SQL.

Example use case: you need to add a new role column to an existing users table and backfill existing rows, while guaranteeing you can roll back the change cleanly if needed.

Quick Start

Ask the skill to create a migration for adding a new column and include a matching rollback and a data backfill step for existing rows.

Frequently Asked Questions about database-migration-helper

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

FAQPage Schema
How do I create database migrations with rollback support and data backfilling?

Database migrations with rollback support require explicit up and down operations, handling index management and data transformations within the same migration flow to ensure safe schema changes. This skill generates those reversible migration patterns automatically.

What is the safest way to add a new column and backfill existing rows in SQL?

The safest way to add a column and backfill rows is using a structured migration that applies schema changes and corresponding data transformations sequentially, while guaranteeing a reversible rollback path. This ensures clean reversion if the deployment fails.

Can I generate reversible schema changes for Prisma, TypeORM, Alembic, and Sequelize?

Yes, you can generate reversible schema changes for Prisma, TypeORM, Alembic, Sequelize, and raw SQL workflows. The generated templates include provider-specific guidance for index management, default handling, and explicit data-migration steps.

How do database migration down operations handle data transformations?

Database migration down operations handle data transformations by defining explicit reverse data-migration steps alongside schema reversion. This guarantees that backfilled or converted column values are safely rolled back to their original state.

What are the limitations of ORM templates for complex schema evolution?

ORM templates for complex schema evolution require well-defined up and down operations, explicit index management, and default handling tailored to the target SQL dialect. Raw SQL workflows may be necessary when provider-specific ORM templates lack advanced data transformation capabilities.