Database Schema Migration Differ & Breaking Change Linter
detect_breaking_migrationsCompare current and target DDL schemas to detect breaking changes, destructive column drops, and lock-inducing mutations before production deployment, preventing downtime.
Instructions
Compares source and target DDL schemas to identify breaking changes, destructive column drops, and lock-inducing mutations. Use when verifying CI/CD migration scripts before production deployment to prevent downtime; for verifying relational normal form, use validate_schema_normalization instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'current_schema' and 'target_schema' ('risk_tolerance' defaults to 'zero_downtime_strict'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_schema | Yes | Proposed new database DDL schema representing target migration state. | |
| current_schema | Yes | Current production database DDL schema representing live tables and columns. | |
| risk_tolerance | No | Deployment safety policy: zero downtime strict, allow transient locks, or permissive dev. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| risk_level | Yes | Categorical migration risk assessment (LOW, MEDIUM, HIGH_LOCK_RISK, CRITICAL_DATA_LOSS). | |
| breaking_operations | Yes | List of destructive changes (e.g., column dropped, non-null without default, type narrowing). | |
| breaking_changes_detected | Yes | True if breaking changes or destructive table mutations were identified. | |
| migration_steps_safe_order | Yes | Recommended zero-downtime phased rollout steps (expand, migrate, contract). |