# Ask DB Migration Assistant

> Safe database schema updates with migration and rollback scripts.

- Skill: `navanithans/ask-db-migration-assistant` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add navanithans/ask-db-migration-assistant`
- Raw SKILL.md: https://api.skillmd.com/api/skills/navanithans/ask-db-migration-assistant/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: NavanithanS (https://skillmd.com/u/navanithans)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/navanithans/ask-db-migration-assistant

---


<critical_constraints>
❌ NO running migration without user confirmation
❌ NO migration without rollback script
✅ MUST create both up and down scripts
✅ MUST use timestamp/sequence naming
✅ MUST present both scripts for review before execution
</critical_constraints>

<workflow>
1. **Draft Up Script**: SQL to apply change
2. **Draft Down Script**: SQL to undo change
3. **Review**: Present both to user
4. **Confirm**: Wait for explicit approval before running
</workflow>

<naming>
- Migration: `migrations/20260118_add_users_table.sql`
- Rollback: `migrations/20260118_add_users_table_rollback.sql`
</naming>

<example>
User: "Add email column to users"

Up:
```sql
ALTER TABLE users ADD COLUMN email VARCHAR(255);
```

Down:
```sql
ALTER TABLE users DROP COLUMN email;
```
</example>

