migration-risk-analyzer

Featured

Analyzes database migration scripts for lock contention, downtime, rollback strategy, and deployment risk. Triggers on: "analyze this migration", "migration risk", "is this migration safe", "schema change risk", "DDL risk", "rollback strategy", "migration review".

API & Backend 316 stars 47 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
83
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Migration Risk Analyzer Systematic risk assessment for database migrations: parse DDL/DML operations, classify lock types and durations, estimate downtime, design rollback strategies, identify irreversible changes, and produce deployment recommendations with pre/post validation queries. ## Reference Files | File | Contents | Load When | | ---------------------------------- | ------------------------------------------------------- | --------------------------- | | `references/lock-matrix.md` | Operation-to-lock-type mapping for PostgreSQL, MySQL | Always | | `references/safe-patterns.md` | Online DDL patterns, zero-downtime migration techniques | Risk mitigation needed | | `references/rollback-templates.md` | Rollback scripts for common DDL operations | Rollback strategy requested | | `references/validation-queries.md` | Pre/post migration validation SQL templates | Always | ## Prerequisites - The migration SQL or migration file (Alembic, Django, Flyway, etc.) - Target database engine (PostgreSQL, MySQL) - Approximate table sizes for affected tables (for duration estimation) ## Workflow ### Phase 1: Parse Migration Extract all operations from the migration script: 1. **DDL operations** — CREATE TABLE, ALTER TABLE (ADD/DROP/MODIFY COLUMN, ADD/DROP INDEX), DROP TABLE, RENAME TABLE 2. **...

Details

Author
Mathews-Tom
Repository
Mathews-Tom/armory
Created
6 months ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Listed

migration-safety

Static scan of migration files for online-safety violations — blocking `CREATE INDEX` without `CONCURRENTLY`, `NOT NULL` added with no safe backfill, destructive drops of columns the running code still reads, and table-rewriting DDL. Run on any diff that adds or edits a migration, and before a deploy that ships a schema change. Not the timed rehearsal against prod-sized data — that is `migration-rehearsal` in the database pack.

1 Updated today
adnanmokhtar
API & Backend Listed

postgres-risk-check

Check the risk of a PostgreSQL change (migration/DDL/bulk DML). Inspect DDL lock levels, zero-downtime change patterns (CONCURRENTLY, NOT VALID→VALIDATE), chunking of large backfills, transactions/concurrency/deadlocks, lock/statement timeout, bloat/VACUUM, and rollback/downtime. Use PROACTIVELY when authoring/reviewing a migration, before a production deploy, or for destructive changes such as DROP/type change.

1 Updated today
ch4570
API & Backend Listed

migration-guard

Review a database schema migration for production hazards BEFORE it deploys — table locks that freeze traffic, data loss, deploy-order breakage, and irreversible steps. Use whenever the user writes or shows a migration (SQL, Alembic, Django, Rails, Prisma, Drizzle, Laravel…) and is about to ship it, or asks "is this migration safe", "will this lock the table", "can I run this on prod". Trigger on any ALTER TABLE / CREATE INDEX / column drop or type change headed for a database with real data — even if the user only asks you to "write a migration", guard your own output too.

0 Updated yesterday
0xmortuex