Postgres Migration Dependency Resolver

Postgres Migration Dependency Resolver MCP Connector for Claude

A+

Resolves the execution order of SQL migrations using graph theory to prevent deployment errors.

3 tools Official Updated Oct 1, 2026 Official Vinkius Partner

The Postgres Migration Dependency Resolver uses Kahn's algorithm and directed acycl-ic graphs (DAG) to determine the exact, deterministic sequence for executing database migrations. By analyzing dependencies between migration IDs, it identifies the correct execution order, detects circular references that would block deployment, and verifies the integrity of your dependency graph. Use resolve_migration_order to find the safe path, validate_dependency_integrity to catch ghost dependencies, and analyze_down_stream_impact to understand the blast radius of a single migration change.

postgresmigrationssqldependency-resolverdeploymentgraph-theory

3 tools expose this connector's capabilities to your AI agent.

resolve_migration_order

Resolves the execution order of migrations

validate_dependency_integrity

Validates that all dependencies exist

analyze_downstream_impact

Analyzes the downstream impact of a migration change

See how to talk to your AI agent using Postgres Migration Dependency Resolver.

Find the execution order for these migrations: [{'id': 'm1', 'requires': []}, {'id': 'm2', 'requires': ['m1']}]

The execution order is: m1, m2. Total migrations processed: 2.

Check if my migration dependencies are valid for: [{'id': 'v1', 'requires': ['v0']}]

The integrity check failed. Missing dependency: v0.

What is the impact of changing migration 'init_schema' in my list?

Changing 'init_schema' affects 5 migrations: ['users', 'profiles', 'orders', 'payments', 'logs'].

The `resolve_migration_order` tool uses Kahn's algorithm to track in-degrees. If migrations remain with non-zero in-degrees after the process, they are identified as part of a cycle.

Related Connectors