dpg plan
dpg plan
Diff desired state vs snapshot and print the SQL migration
Synopsis
Compare .dpg source files against the committed snapshot (or the live database with –live) and print the minimal SQL required to reach the desired state. No database connection is required unless –live is set.
Use –format json for machine-readable output suitable for CI or tooling. Use –watch to re-run automatically whenever source files change.
dpg plan [flags]
Options
--cluster string cluster to plan (required when multiple clusters exist)
--database string database to plan (required when multiple databases exist)
--format string output format: text or json (default "text")
-h, --help help for plan
--live diff against the live database instead of the stored snapshot
--watch re-run whenever source files change (polls every 500ms)
Options inherited from parent commands
-C, --dir string project root directory (default: current working directory)
--env string path to .env file (default: .env in project root, if present)
SEE ALSO
- dpg - Declarative PG — schema compiler and migration tool