Safe schema migrations alembic rollback zero downtime
Scanned 9/10/2026
Install to Claude Code
npx -y skills add LoopyLuci/Skills --skill database-migration-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Database Migration Patterns?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/loopyluci-database-migration-patterns)More formats (shields.io, HTML) on the badges page.
---
name: database-migration-patterns
description: "Safe schema migrations alembic rollback zero downtime"
---
# Database Migration Patterns
## Alembic
```bash
pip install alembic
alembic init migrations
alembic revision --autogenerate -m "add users table"
alembic upgrade head
```
## Rollback
```bash
alembic downgrade -1
```
## Zero-Downtime Steps
1. Add column nullable
2. Deploy app (writes to new column)
3. Backfill data
4. Add NOT NULL constraint
5. Deploy app (reads from new column)
6. Drop old column
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!