Making changes to a live database can be risky. Database migrations let you update tables, columns, and indexes without breaking your application. You can also roll back changes if something goes wrong.
This guide covers best practices for PostgreSQL and MySQL. It also explains how to use popular ORM tools like Prisma, Django, and TypeORM. You will learn how to avoid downtime by using patterns like expand-contract and concurrent index creation.
Migrations should always be tested with production-sized data. Never edit a migration that has already run. Keep schema and data changes in separate steps. These simple rules keep your database reliable.
Global
mkdir -p ~/.claude/skills/database-migrationsProject
mkdir -p .claude/skills/database-migrationsSource Repository
Supabase Postgres Best Practicessupabase/agent-skills
Follow Supabase's expert guidelines for faster Postgres queries and smarter schema design
Firebase Data Connectfirebase/agent-skills
Build secure PostgreSQL backends with Firebase using GraphQL schemas and type-safe SDKs
Convex Migration Helperget-convex/agent-skills
Plan and run safe Convex schema migrations without downtime or data loss
Firebase Firestorefirebase/agent-skills
Master Cloud Firestore setup, queries, full-text search, security rules, and indexes
Neon Postgresneondatabase/agent-skills
Set up and manage Neon Serverless Postgres with ease and speed
Firebase Firestore Standardfirebase/agent-skills
Set up and secure Cloud Firestore with clear provisioning rules and SDK guides
Firebase Firestore Enterprise Native Modefirebase/agent-skills
Master Firestore Enterprise Native Mode provisioning data modeling security rules and SDK usage
Postgresql Table Designwshobson/agents
Design PostgreSQL tables with best practices for performance and reliability