migrations

Automate Alembic database migrations with review-before-apply and rollback safeguards.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/mrsknetwork/nemodev --skill migrations-mrsknetwork
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrations
Source: https://github.com/mrsknetwork/nemodev/tree/main/skills/domains/references/migrations
Command: npx skills add https://github.com/mrsknetwork/nemodev --skill migrations-mrsknetwork

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migrations are risky and error-prone; this skill enforces a review-before-apply workflow to prevent data loss during schema changes.

Core Features & Use Cases

  • Alembic-based workflow for generating, reviewing, and applying migrations
  • Safe NOT NULL migrations (3-step pattern) and rollback support
  • Guidance for staging/production deployment and backups during schema changes

Quick Start

Run a safe migration workflow by generating a new Alembic revision and applying it to a staging environment before production

Frequently Asked Questions about migrations

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

FAQPage Schema
How do I safely apply database schema changes to production without data loss?

To safely apply database schema changes to production without data loss, use a review-before-apply workflow that enforces pre-apply reviews, staging validation, and rollout-safe rollback safeguards. This prevents deployment issues during table and column alterations.

What is the best way to handle NOT NULL constraints in SQLAlchemy migrations?

The best way to handle NOT NULL constraints in SQLAlchemy migrations is using a 3-step pattern. This approach ensures existing rows are updated before enforcing the constraint, avoiding data loss and migration failures.

How do I generate and apply Alembic revisions across different environments?

To generate and apply Alembic revisions across environments, create a new revision and apply it to staging first. After validating the schema change in staging, deploy the migration to production using rollback safeguards.

When do I need a rollback strategy for database migrations?

You need a rollback strategy for database migrations whenever adding or altering tables, columns, and indexes. Rollback safeguards ensure you can safely revert schema changes if deployment issues or data loss risks occur during production rollout.

Can I use Alembic to automate database migrations for index alterations?

Yes, you can use Alembic to automate database migrations for index alterations. The workflow generates, reviews, and applies schema changes while enforcing pre-apply checks and rollback support to prevent deployment issues.

Why do database migrations fail during production deployments?

Database migrations fail during production deployments due to unhandled NOT NULL constraints, missing pre-apply reviews, and lack of rollback safeguards. Enforcing a staged review-before-apply workflow prevents these data loss risks.