database-migration
Database migrations with Alembic, rollbacks, and zero-downtime deployment.
Skill by ils15
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ils15-database-migration-f55315
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
database-migration- Description
- Database migrations with Alembic, rollbacks, and zero-downtime deployment. Use for schema changes.
- License
- MIT
- Instructions
- 111 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Database Migration Skill
## Migration Lifecycle
### 1. Generate Migration
```bash
alembic revision --autogenerate -m "Add user preferences"
```
### 2. Review Generated Script
```python
# File: alembic/versions/001_add_user_preferences.py
def upgrade():
op.create_table('user_preferences',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('theme', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['user.id']),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('user_preferences')
```
### 3. Add Indexes
```python
def upgrade():
op.create_table(...)
# Add indexes for performance
op.create_index(
'ix_user_preferences_user_id',
'user_preferences',
['user_id']
)
def downgrade():
op.drop_index('ix_user_preferences_user_id')
op.drop_table('user_preferences')
```
### 4. Test Locally
```bash
# Test upgrade
alembic upgrade head
# Verify data integrity
SELECT * FROM user_preferences;
# Test downgrade
alembic downgrade -1
# Verify
SELECT COUNT(*) FROM user_preferences; # Should error
```
### 5. Test on Production-like Data
```bash
# Backup production
pg_dump production > backup.sql
# Load to staging
psql staging < backup.sql
# Run migration
alembic upgrade head
# Performance test
EXPLAIN ANALYZE SELECT * FROM user_preferences WHERE user_id = 123;
```
### 6. Deploy with Zero Downtime
```python
# Strategy 1: Expand-Contract
# 1. Add new column (backward compatible)
# 2. Backfill data
# 3. Deploy code to use new column
# 4. Drop old column
# Strategy 2: Blue-Green
# 1. Deploy new schema to green DB
# 2. Sync data
# 3. Switch traffic to green
# 4. Keep blue as rollback option
```
## Backward Compatibility Rules
- ✅ Add columns with defaults
- ✅ Add tables
- ✅ Add indexes
- ✅ Change column types (with care)
- ❌ Drop columns without deprecation
- ❌ Rename columns without alias
- ❌ Change constraints abruptly
## Versioning
- Never edit old migrations
- Always create new migration
- Migrations are immutable
- Name clearly: `001_initial_schema.py`
## Rollback Procedure
ALWAYS test downgrade first:
```bash
alembic current # See current version
alembic downgrade -1 # Go back 1 version
alembic upgrade +2 # Forward 2 versions
```From ils15/pantheon-legacy, MIT.
More from ils15/pantheon-legacy
- 0.543score
handoff
ils15
Generate session handoff documents for work continuation.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
code-review-checklist
ils15
Systematic code review with quality gates, security audit, and parallel checks.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
orchestration-workflow
ils15
Practical step-by-step walkthrough for orchestrating features end-to-end using the multi-agent system, from planning through deployment
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
task-system
ils15
File-backed task management with dependencies and parallel execution.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
agent-coordination
ils15
Multi-agent orchestration with model routing, category delegation, and sprint management.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
prompt-improver
ils15
Improve prompts using best practices for clarity, specificity, and structure.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
tdd-with-agents
ils15
TDD enforcement with RED→GREEN→REFACTOR cycle and advanced testing patterns.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
frontend-analyzer
ils15
Analyze React components for design tokens and accessibility.
SkillCFreshness: C★ 12Claude Code +9 - 0.538score
artifact-management
ils15
Structured artifact trail for feature implementations — plans, implementations, reviews, and decisions.
SkillCFreshness: C★ 12Claude Code +9 - 0.538score
api-design-patterns
ils15
Design RESTful APIs with pagination, filtering, and OpenAPI docs.
SkillCFreshness: C★ 12Claude Code +9 - 0.538score
conversational-ai-design
ils15
Design conversational AI with Rasa NLU, dialogue management, and LangChain memory patterns.
SkillCFreshness: C★ 12Claude Code +9 - 0.538score
agent-evaluation
ils15
Evaluate AI agent outputs — hallucination detection, quality scoring, behavioral testing, and CI/CD pipelines.
SkillCFreshness: C★ 12Claude Code +9
Signals
- Stars
- 12
- Forks
- 7
- Open issues
- 1
- Last commit (this folder)
- May 20, 2026 (5 months ago)
- Last release
- Jul 22, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ils15/pantheon-legacy
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from ils15
- 0.543score
handoff
ils15
Generate session handoff documents for work continuation.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
orchestration-workflow
ils15
Practical step-by-step walkthrough for orchestrating features end-to-end using the multi-agent system, from planning through deployment
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
frontend-analyzer
ils15
Analyze React components for design tokens and accessibility.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
code-review-checklist
ils15
Systematic code review with quality gates, security audit, and parallel checks.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
agent-coordination
ils15
Multi-agent orchestration with model routing, category delegation, and sprint management.
SkillCFreshness: C★ 12Claude Code +9 - 0.541score
prompt-improver
ils15
Improve prompts using best practices for clarity, specificity, and structure.
SkillCFreshness: C★ 12Claude Code +9
Cite this page
database-migration skill. Agent Mart. https://agentmart.dev/skills/ils15-database-migration-f55315 (last updated 2026-10-24)