Verify all migrations
verify_allChecks every repository migration against the live Postgres catalog, summarizing per-migration status and reporting mismatches, unverifiable statements, and history gaps before deploys.
Instructions
Check every repository migration against the live Postgres catalog. Returns a summary table (per migration: verdict, matched/checked, superseded, unverifiable, recorded in history) and the full report of each MISMATCH. The totals call out migrations applied but not recorded in history and migrations recorded but not fully applied. Use it for the whole picture or before a deploy; use verify_migration for one file. Meaning of the output: MATCH = every object the migration should leave behind exists as written. MISMATCH = at least one object is MISSING (not found), DIFFERENT (found with other attributes, e.g. type or nullability) or UNEXPECTED (dropped or renamed by the migration but still there). MATCH* = a MATCH that does not show the file ran (every check would also hold without it), so "NOT recorded" there does not mean applied by hand. NOTHING TO VERIFY = no statement yields a catalog check. SUPERSEDED = a later migration drops or rebuilds the object or what it depends on (or IF NOT EXISTS skipped the statement), so it cannot be checked against this file; objects renamed later are checked under their new name. UNVERIFIABLE = a statement that cannot be checked against the catalog (DO blocks, GRANTs, data changes); review it by hand. Read-only: it reads migration files and pg_catalog inside a READ ONLY transaction, and never runs migration SQL or writes anything. Needs a database URL (PGMV_DATABASE_URL or DATABASE_URL); without one it returns an error saying how to configure it.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "verify_all"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No | Migrations directory. Relative paths are resolved against the project directory. It must be inside the project directory or the configured migrations directory. Omit to use the configured directory (PGMV_MIGRATIONS_DIR, default supabase/migrations). | |
| verbose | No | Also list objects that match and statements that were ignored. Default false: only problems, superseded objects and unverifiable statements are listed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| totals | Yes | ||
| history | Yes | Whether the recorded migration history could be read | |
| directory | Yes | Migrations directory, relative to the project directory when it is inside it | |
| migrations | Yes |