# Migration Helper

> Analyze GORM model changes, estimate resulting schema (DDL) differences, and propose safe migration steps with verification guidance.

- Skill: `pilinux/migration-helper` (Agent Skill)
- Install (CLI): `npx skillmds@latest add pilinux/migration-helper`
- Raw SKILL.md: https://api.skillmd.com/api/skills/pilinux/migration-helper/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: pilinux (https://skillmd.com/u/pilinux)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/pilinux/migration-helper

---


# Migration Helper

## When to Use

- A model change (field add/remove/type change) or migration code is proposed and you need a safe rollout plan.

## Rules

- Start with a non-destructive assessment and clearly call out destructive operations (drops, type narrows, index changes).
- Recommend backups, staging verification, and zero-downtime considerations for risky changes.

## Project-Specific Paths

- Core migration: `database/migrate/`
- Example app migration: `example2/internal/database/migrate/`
- Core models: `database/model/` (`Auth`, `TwoFA`, `TwoFABackup`, `TempEmail`)

## Workflow

1. Locate migration entrypoints in the paths above.
2. Map model edits to likely DDL changes and affected queries.
3. Recommend migration steps and verification commands (local + staging).

## Output

- **Affected models:** `path:line` entries.
- **Schema updates:** likely DDL changes and risk level (low/medium/high).
- **Verification:** steps and test commands.

## Examples

- "Adding a `Role` field to `Auth` model - what migration is needed?"
- "Changing `IDAuth` from uint64 to uint32 - what are the risks?"

## Related Skills

- `db-infra-mocks`, `test-runner`, `patch-applier`

