Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Database Migrations?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-database-migrations)
---
name: database-migrations
description: Zero-downtime schema migrations with expand/backfill/contract and safe locking.
tags: [database]
---
# Database Migrations
## When to use
- Any schema change on a live database
## Procedure
1. Expand: add nullable columns/tables
2. Deploy code that writes both
3. Backfill in batches
4. Switch reads
5. Contract: remove old columns later
6. Set lock timeouts
## Checklist
- [ ] Migration reversible
- [ ] Large-table operations batched
## Anti-patterns
- Renaming columns in one step
- Adding NOT NULL with default on huge tables in old Postgres