db-migrate

Generate and apply Alembic database migrations from SQLAlchemy model changes.

1|1|Updated May 13, 2026
One-click install
npx skills add https://github.com/bibektimilsina00/fuse_monorepo --skill db-migrate-bibektimilsina00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migrate
Source: https://github.com/bibektimilsina00/fuse_monorepo/tree/main/.agents/skills/db-migrate
Command: npx skills add https://github.com/bibektimilsina00/fuse_monorepo --skill db-migrate-bibektimilsina00

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you turn SQLAlchemy model changes into accurate Alembic migrations without guessing what needs to be added, removed, or updated in your database schema.

Core Features & Use Cases

  • Generate Alembic revisions from model changes using autogeneration and a concise snake_case migration message.
  • Review the generated migration before applying by inspecting the new revision and highlighting table/column changes plus downgrade correctness.
  • Apply the migration only after confirmation, reducing the risk of breaking non-empty production databases.

Quick Start

Run /db-migrate add_execution_tags to generate an Alembic migration for the new execution tags change and then review the output before applying it.

Frequently Asked Questions about db-migrate

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

FAQPage Schema
How do I generate Alembic migrations from SQLAlchemy model changes?

You generate Alembic migrations by autogenerating a revision from SQLAlchemy model changes using a descriptive snake_case message. The tool creates the revision from apps/api, presents the resulting table and column changes, and validates downgrade behavior before applying anything.

How can I safely apply database schema migrations to a non-empty PostgreSQL database?

To safely apply database schema migrations to a non-empty PostgreSQL database, the tool presents the generated migration changes for review and only executes alembic upgrade head after explicit confirmation. This reduces the risk of breaking existing production databases by validating intent first.

Can I review and validate downgrade behavior before running an Alembic migration?

Yes, you can review and validate downgrade behavior before running an Alembic migration. The tool highlights table and column changes alongside downgrade correctness, requiring you to confirm intent before it applies the alembic upgrade head command to your PostgreSQL schema.

Does db-migrate work with PostgreSQL for adding columns and altering constraints?

Yes, db-migrate works with PostgreSQL for adding columns and altering constraints. It fits workflows requiring controlled schema evolution for PostgreSQL-backed services, generating SQLAlchemy migrations that accurately capture constraint alterations and column additions for your database.

What happens if an Alembic migration fails during the upgrade head process?

If an Alembic migration fails during the upgrade head process, the tool surfaces the full error details. This immediate error reporting helps developers diagnose schema evolution issues without guessing what went wrong during the PostgreSQL database migration.