db-migration-review

Analyze database migration files for high-risk patterns and rollback safety.

2|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/gaebalai/claude-code-kit-ko --skill db-migration-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migration-review
Source: https://github.com/gaebalai/claude-code-kit-ko/tree/main/.claude/skills/db-migration-review
Command: npx skills add https://github.com/gaebalai/claude-code-kit-ko --skill db-migration-review

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill proactively identifies and mitigates risks associated with database migration scripts, preventing potential production incidents like data loss, extended downtime, or performance degradation.

Core Features & Use Cases

  • Risk Pattern Detection: Analyzes SQL or ORM migration files for dangerous patterns (e.g., table locks, large ALTERs, data loss).
  • Safety Recommendations: Provides concrete, safe alternatives and rollback strategies.
  • Use Case: Before deploying a complex database schema change, run this Skill on your migration scripts to get a detailed risk assessment and actionable advice to ensure a smooth production rollout.

Quick Start

Review the database migration file located at 'migrations/v1.2.sql' for potential risks.

Frequently Asked Questions about db-migration-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check SQL migration files for production risks like table locks?

To check SQL migration files for production risks like table locks, perform static analysis to detect dangerous patterns such as large-scale ALTER operations and potential data loss. This process provides detailed risk assessments and suggests safe alternative implementations to safeguard your database.

What is the best way to ensure rollback safety for database schema changes?

The best way to ensure rollback safety for database schema changes is to evaluate your migration scripts using static analysis. This identifies high-risk patterns early and provides concrete rollback strategies, preventing extended downtime or performance degradation during production rollouts.

Does static analysis work with ORM-specific migration syntaxes?

Yes, static analysis works with ORM-specific migration syntaxes as well as standard SQL. It analyzes these migration files to detect high-risk patterns, offering detailed risk assessments and safe alternatives regardless of the specific database migration syntax used.

How do I prevent data loss when deploying complex database migrations?

To prevent data loss when deploying complex database migrations, run static analysis on your migration scripts before deployment. This proactively identifies potential data loss patterns and provides actionable advice and safe alternatives for a smooth production rollout.

What are common high-risk patterns in database migration scripts?

Common high-risk patterns in database migration scripts include table locks, large-scale ALTER operations, and potential data loss. Identifying these patterns through static analysis helps mitigate risks associated with database schema changes and prevents production incidents.