plan Command
plan compares a built package to a live PostgreSQL database and emits the resulting operations.
pgpac plan \
--package <file.pgpkg> \
--connection <postgres-uri> \
[--format text|json] \
[--script <file>] \
[--allow-drop]
Required flags
--package: path to a.pgpkgfile--connection: PostgreSQL connection string
Optional flags
--format:textorjson, defaults totext--script: writes rendered SQL to a file--allow-drop: allows destructive operations to be rendered as executable SQL instead of blocked comments
Plan model
Plans include:
- summary metadata
- destructive-operation detection
- ordered operations with kind, object type, object key, risk, and SQL