Skip to main content
Use plan when you need to inspect schema operations before SQL is rendered. plan runs the same comparison and migration-corpus extraction as diff, prints the MigrationPlan JSON, and leaves the filesystem untouched.

Use this when

  • Review automation needs operation data.
  • A migration looks surprising and you want the planner view.
  • You want destructive or blocked operations before rendering SQL.
  • Downstream tooling should summarize schema impact.
  • You need to confirm whether existing migrations supplied the source intent for backfills, Vault references, or workload-derived indexes.

Run it

Flags

source
Before-state source. Defaults to config.sources.from. A migrations: value must match the configured migrations directory.
source
Desired-state source. Defaults to dir:<config.schemaPaths[0]>. Migration replay is not supported here.
names
Plan only the comma-separated PostgreSQL schema names.
boolean
Print extract and plan timings to stderr.

Exit codes

Diff

Render the plan as replay-safe SQL.

Inspect

See the extracted model behind a source.

Sources

Pick source specifiers for --from and --to.

Hints

Approve blocked destructive changes.
Last modified on July 25, 2026