db-migration-check

Detect dangerous operations in database migration files and propose safe alternatives.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/mehdic/CDC --skill db-migration-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migration-check
Source: https://github.com/mehdic/CDC/tree/main/.claude/skills/db-migration-check
Command: npx skills add https://github.com/mehdic/CDC --skill db-migration-check

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill analyzes migrations to identify dangerous operations and provides actionable remediation guidance.

Core Features & Use Cases

  • Detects risky operations (e.g., adds with defaults, non-concurrent indexes)
  • Produces a prioritized list of dangerous ops and safe alternatives
  • Recommends safe deployment practices

Quick Start

Run the migration checker to analyze pending migrations and export results to bazinga/artifacts/{SESSION_ID}/skills/db_migration_check.json.

Frequently Asked Questions about db-migration-check

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

FAQPage Schema
How do I detect dangerous operations in database migrations before deploying?

Dangerous database operations like adding columns with defaults or creating non-concurrent indexes can lock tables during deployment. This Skill analyzes migration files across Alembic, Django, Flyway, Liquibase, Mongoose, and ActiveRecord to identify risky changes, flag them with severity levels, and suggest safer alternatives before you deploy.

Can I use migration checking with PostgreSQL, MySQL, SQL Server, and MongoDB?

Yes. This Skill supports migration analysis across PostgreSQL, MySQL, SQL Server, and MongoDB, working with multiple migration frameworks including Alembic, Django, Flyway, Liquibase, Mongoose, and ActiveRecord to catch dangerous operations regardless of your database platform.

What risky migration patterns does the checker identify?

The Skill detects patterns like adding columns with non-null defaults, creating blocking indexes without concurrency flags, dropping columns without backups, and other operations that cause downtime or data loss. It outputs a structured risk report with specific warnings and safe alternatives for each issue.

How do I export migration analysis results for team review?

The Skill generates a JSON artifact at bazinga/artifacts/{SESSION_ID}/skills/db_migration_check.json containing the complete risk report, dangerous operations flagged by priority, safe migration recommendations, and actionable remediation steps for team review and deployment planning.

Do I need to set up my migration framework before running the checker?

Your migration files must already exist in your project using a supported framework—Alembic, Django, Flyway, Liquibase, Mongoose, or ActiveRecord. The Skill analyzes pending migrations directly without requiring framework reconfiguration or special setup.

What's the difference between safe and dangerous migration practices?

Dangerous migrations lock production tables and risk downtime; safe migrations use concurrent index creation, add columns without defaults first, and perform risky changes during maintenance windows. This Skill explains each risk and proposes safe deployment strategies for typical upgrade scenarios.