database-migrations

Guide safe, automated database migrations for PostgreSQL, MySQL, and ORM workflows.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/adomot/claude-settings --skill database-migrations-adomot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/adomot/claude-settings/tree/main/skills/aegis/database-migrations
Command: npx skills add https://github.com/adomot/claude-settings --skill database-migrations-adomot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides safe, reversible patterns for modifying database schemas in production, reducing downtime and risk during migrations.

Core Features & Use Cases

  • Zero-downtime migrations: Expand-then-contract strategies to minimize user impact.
  • Backward-compatible changes: Techniques for adding new columns and gradually phasing out old ones.
  • Guided migrations for major ecosystems: PostgreSQL, MySQL, and ORM-driven workflows (Prisma, Drizzle, Django, TypeORM, golang-migrate).
  • Use Case: When you need to add a non-nullable field, create with NULL or default, backfill in batches, then drop the old field after cutover.

Quick Start

Implement a safe, multi-phase migration plan that expands the schema, backfills data in batches, and contracts the old schema.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I perform zero-downtime database migrations in production?

Zero-downtime database migrations use an expand-then-contract strategy to modify schemas without locking tables. You expand the schema with backward-compatible changes, backfill data in batches, and contract the old schema after application cutover.

What is the safest way to add a non-nullable column during a database migration?

The safest way to add a non-nullable column during a database migration is to create it with a default value or as nullable. You then backfill existing rows in batches before enforcing constraints and dropping deprecated fields.

Does this database migration approach work with ORM tools like Prisma and Django?

Yes, this approach works with ORM-driven workflows including Prisma, Drizzle, Django, TypeORM, and golang-migrate. It provides guided migration patterns to ensure safe schema changes across PostgreSQL and MySQL production environments.

How do I plan a rollback for a failed production database migration?

Planning a rollback for a failed production database migration involves defining explicit reversal steps for each schema change. You must account for data backfills and ensure backward compatibility so the application can safely revert to the previous database state.

What are the limitations of automated database migrations for large datasets?

Automated database migrations for large datasets require careful batch sizing during data backfills to avoid locking issues. You must also maintain backward compatibility throughout the multi-phase expand and contract process to prevent application downtime.