$npx skillfedfor your agent

database-migration-patterns

Master versioned, reversible database migrations that evolve schemas without downtime. Learn Alembic setup, multi-phase column operations, data backfills, and testing strategies to keep applications running during schema changes.

Database Migration Patterns helps you implement safe, reversible schema changes with zero-downtime strategies and Alembic.

AI-generated summary based on this skill's SKILL.md

14 6 Apache-2.0updated by organvm

Decision gist · record as of 2026-07-22

Database Migration Patterns helps you implement safe, reversible schema changes with zero-downtime strategies and Alembic. Master versioned, reversible database migrations that evolve schemas without downtime. Learn Alembic setup, multi-phase column operations, data backfills, and testing strategies to keep applications running during schema changes.

manual: git clone https://github.com/organvm/a-i--skills → cp -r a-i--skills/skills/development/database-migration-patterns ~/.claude/skills/database-migration-patterns
skills/development/database-migration-patterns/SKILL.md · version cbc16b54

Use it when

  • database-migration-patterns covers Alembic setup from initialization through env.py configuration.
  • database-migration-patterns emphasizes testing both directions of every migration before production.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

organvm/a-i--skills/database-migration-patterns · repository language: Python

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How to safely migrate database schema without downtime?

database-migration-patterns teaches safe schema evolution through versioned, reversible migrations. The skill covers zero-downtime techniques including multi-phase operations for renames and removals, concurrent index creation, and strategies that prevent table locks. You'll learn to structure changes so applications continue running while schemas evolve, using Alembic's upgrade/downgrade capabilities to maintain control over each transition.

What is Alembic migration setup and configuration?

database-migration-patterns covers Alembic setup from initialization through env.py configuration. You'll learn to initialize Alembic in your project, configure database connectivity, set up version control for migrations, and customize the migration environment. The skill includes best practices for organizing migration files, managing multiple database targets, and configuring Alembic to work safely in production pipelines.

How do you test migration upgrade and downgrade paths?

database-migration-patterns emphasizes testing both directions of every migration before production. The skill teaches frameworks and strategies for validating upgrade paths, ensuring downgrades restore previous state, and catching data loss or corruption early. You'll learn to automate migration testing, verify schema integrity after transitions, and build confidence that rollbacks will succeed if needed.

How can you safely rename a column in production?

database-migration-patterns covers multi-phase column rename patterns that eliminate downtime. The approach involves creating a new column, backfilling data, updating application code to use both columns, then dropping the old column in a later phase. This skill teaches how to coordinate these phases, handle concurrent writes, and validate data integrity throughout the rename process.

What strategies exist for backfilling and transforming data?

database-migration-patterns teaches data migration strategies that run safely during schema evolution. You'll learn to backfill new columns with computed or transformed values, handle large tables in batches to avoid locks, and validate data consistency after transformations. The skill covers techniques for concurrent data changes and ensures backfills don't block application traffic.

How do you prevent table locks during schema changes?

database-migration-patterns addresses lock prevention through techniques like concurrent index creation, non-blocking column additions, and multi-phase operations. The skill teaches database-specific approaches (PostgreSQL, MySQL) for avoiding exclusive locks, batching large changes, and structuring migrations so applications remain responsive. You'll learn to monitor lock contention and adjust strategies for your database platform.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Database Migration Patterns

Evolve database schemas safely with versioned, reversible, tested migrations.

Alembic Setup

# Initialize
alembic init alembic

# Create migration
alembic revision --autogenerate -m "add skills table"

# Run migrations
alembic upgrade head

# Rollback one step
alembic downgrade -1

# Show current state
alembic current
alembic history
Configuration

```python

alembic/env.py

from app.models import Base from

(truncated - see the full file via the links below)

File tree — 1 file
skills/development/database-migration-patterns/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Implement safe, reversible database schema changes with zero downtime”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

Alembic
by manutej · manutej/luxor-claude-marketplace

Alembic provides version-controlled database migration management for support systems built on SQLAlchemy. Create, test, and deploy schema changes across environments while preserving data integrity and enabling safe rollbacks.

no license declared → metadata onlyupdated Jun 2026
★ 61repo stars
Database Migration Patterns
by mindmorass · mindmorass/reflex

Master database migration techniques including expand-contract patterns, safe index creation, and batch processing for large tables. This skill covers zero-downtime schema changes, foreign key constraints, and rollback strategies using Alembic.

no license declared → metadata onlyupdated Feb 2026
★ 2repo stars
Alembic Patterns
by majesticlabs-dev · majesticlabs-dev/majestic-marketplace

Master Alembic migration patterns for evolving SQLAlchemy database schemas safely. This skill covers initialization, auto-generating migrations from model changes, executing manual data transformations, and deploying schema updates without downtime using proven patterns like nullable-first column additions and concurrent indexing.

no license declared → metadata onlyupdated May 2026
★ 44repo stars
Sqlmodel Expert
by bilalmk · bilalmk/todo_correct

Build robust database layers with SQLModel patterns for one-to-many, many-to-many, and self-referential relationships. Manage schema evolution safely using Alembic migrations, from autogenerated changes to complex data transformations. Includes query optimization techniques, inheritance patterns, and production-ready helper scripts.

no license declared → metadata onlyfor claude-codeupdated Jan 2026
★ 1repo stars
Sqlalchemy
by manutej · manutej/luxor-claude-marketplace

SQLAlchemy ORM Expert covers modern ORM patterns, session handling, and query performance tuning tailored for customer support systems. Learn to design robust data models with relationships, leverage async operations in FastAPI, and integrate PostgreSQL effectively. The skill walks through real support scenarios including ticket management, user authentication, and bulk data operations.

no license declared → metadata onlyupdated Jun 2026
★ 61repo stars
sqlalchemy
by bobmatnyc · bobmatnyc/claude-mpm-skills

SQLAlchemy equips Python developers with a robust SQL toolkit and ORM for building type-safe database applications. Master declarative models, relationship mapping, efficient query patterns, and async support using SQLAlchemy 2.0's modern API.

MITupdated Jul 2026
★ 62repo stars

More skills oma-db (MIT)

Tags
schema-evolutionreversible-changesproduction-safetyversion-control-dbdowntime-preventiondata-integritymigration-automationrollback-strategy