majinmagros/magros.ai-skills/database-migrations

Claude Code and agent skill by majinmagros/magros.ai-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate). Triggers on \"database-migrations\", \"database migrations\", \"migrations\".

Install

npx vskill@latest install majinmagros/magros.ai-skills/database-migrations

SKILL.md

The same SKILL.md was published earlier as majinmagros/magros.ai-skills/database-migrations.

Database Migration Patterns

Safe, reversible schema changes: forward-only in production, schema and data migrations separate, expand-contract for renames. Detalhes em references/.

When to Activate

  • Creating or altering database tables
  • Adding/removing columns or indexes
  • Running data migrations (backfill, transform)
  • Planning zero-downtime schema changes
  • Setting up migration tooling for a new project

Core Principles

  1. Every change is a migration — never alter production manually
  2. Forward-only in production — rollbacks are new forward migrations
  3. Schema and data separate — never mix DDL and DML
  4. Test at production scale — 100 rows OK can lock at 10M
  5. Immutable once deployed — never edit a ran migration

Safety Checklist

  • [ ] UP and DOWN (or explicitly irreversible)
  • [ ] No full table locks (concurrent ops on large tables)
  • [ ] New columns nullable or with default
  • [ ] Indexes via CONCURRENTLY, backfill in separate migration
  • [ ] Tested on production-data copy, rollback plan documented

Example

sql
-- Safe: nullable first, no lock, no rewrite
ALTER TABLE users ADD COLUMN avatar_url TEXT;
-- Unsafe: NOT NULL without default rewrites every row
-- ALTER TABLE users ADD COLUMN role TEXT NOT NULL;

References

  • references/postgres-patterns.md — safe ADD COLUMN, concurrent index, rename/drop, batched backfill
  • references/orms-ts.md — Prisma, Drizzle, Kysely workflows + migration files
  • references/orms-py-go.md — Django data migrations, SeparateDatabaseAndState, golang-migrate
  • references/zero-downtime.md — expand-contract phases, timeline, anti-patterns table

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2
7-day trend score
10

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/majinmagros/magros.ai-skills/database-migrations/badge)](https://verified-skill.com/skills/majinmagros/magros.ai-skills/database-migrations)

Something wrong with this skill or its page? Tell us.