Problem
When local migration files and remote migration history drift, there is currently no first-class MCP equivalent of:
supabase migration repair --status applied ...
supabase migration repair --status reverted ...
This blocks fully plugin-first workflows and forces fallback to CLI or manual SQL edits on supabase_migrations.schema_migrations.
Proposed Solution
Add a dedicated MCP tool, e.g. repair_migrations, with inputs like:
project_id
status (applied | reverted)
versions (array of migration versions)
- optional
dry_run (default true)
Expected Behavior
- Supports batch updates to migration history.
- Validates version format and existence.
- Returns structured diff before apply (when dry_run).
- Returns clear summary: applied_count, reverted_count, skipped_count.
Why this matters
This is a critical missing operation for real-world migration drift recovery and is required for safe plugin-first DB operations.
Problem
When local migration files and remote migration history drift, there is currently no first-class MCP equivalent of:
supabase migration repair --status applied ...supabase migration repair --status reverted ...This blocks fully plugin-first workflows and forces fallback to CLI or manual SQL edits on
supabase_migrations.schema_migrations.Proposed Solution
Add a dedicated MCP tool, e.g.
repair_migrations, with inputs like:project_idstatus(applied|reverted)versions(array of migration versions)dry_run(default true)Expected Behavior
Why this matters
This is a critical missing operation for real-world migration drift recovery and is required for safe plugin-first DB operations.