Skip to content
dbpm

dbpm plan

Generate and print a deployment plan as JSON without executing anything. Useful for inspecting what dbpm would do before committing to a deployment.

dbpm plan source [--mode MODE] [--env ENV] [--approve]
[--package NAME]
[--dependency-source SOURCE]...
[--registry-url URL]
[--connect STRING] [--runner EXEC]
flowchart LR
command["command"] --> dbpm["dbpm"]
dbpm --> plan["plan"]
plan --> source["source"]
source --> options["{ option }"]
options --> end_node(("end"))
options -. expands to .-> option["option"]
option --> mode["--mode MODE"]
option --> env["--env ENV"]
option --> approve["--approve"]
option --> package["--package NAME"]
option --> dependency_source["--dependency-source SOURCE"]
option --> registry_url["--registry-url URL"]
option --> connect["--connect STRING"]
option --> runner["--runner EXEC"]
mode -. choices .-> mode_note["bootstrap-core, install, upgrade, reinstall, resume, validate"]
package -. only when source is a workspace root .-> package_note["selects workspace package"]
dependency_source -. repeatable .-> dep_note["may satisfy manifest dependencies"]
registry_url -. only for registry sources .-> registry_note["sets registry base URL"]
connect -. enriches output .-> state_note["includes installed state from Core"]
ArgumentDefaultDescription
sourcerequiredPackage source. See source types.
--modeinstallDeployment mode to plan. One of: bootstrap-core, install, upgrade, reinstall, resume, validate.
--envdevelopmentTarget environment name.
--approvefalseApprove policy-gated actions.
--packagenonePackage name or application name to select when source is a workspace root.
--dependency-sourcenoneAdditional source that may satisfy a dependency declared in the manifest. Repeatable.
--registry-urlDBPM_REGISTRY_URL or https://registry.dbpm.ioRegistry base URL for registry: sources.
--connectDBPM_CONNECTConnect string. When provided, the plan includes the currently installed state from Core.
--runnerDBPM_SQL_RUNNER or sqlplusSQL runner executable.

Prints a dbpm.plan.v0 or dbpm.multi-plan.v0 JSON object to stdout.

When --connect is provided, the plan includes installed_state for each package, enabling accurate preflight evaluation. Without --connect, installed state is omitted and the plan reflects resolution only.

For upgrade with --connect, if a stepwise chain is required, the output is a dbpm.upgrade-chain.v0 plan with a steps array.

Plan an install without a database connection:

Terminal window
dbpm plan gh-maven:512itconsulting/utl_interval:com.512itconsulting.database:utl_interval:1.0.0

Plan an upgrade with installed state:

Terminal window
dbpm plan gh-maven:512itconsulting/utl_interval:com.512itconsulting.database:utl_interval:1.2.0 \
--mode upgrade --connect user/pass@db

Plan a multi-package install with a dependency:

Terminal window
dbpm plan gh-maven:rsantmyer/simple_scheduler:com.512itconsulting.database:simple_scheduler:1.1.0 \
--dependency-source gh-maven:512itconsulting/utl_interval:com.512itconsulting.database:utl_interval:1.0.0

Plan from the dbpm registry:

Terminal window
dbpm plan registry:simple_scheduler@^1.1.0 --registry-url https://registry.dbpm.io

Plan a package from a workspace root:

Terminal window
dbpm plan ~/repos/my_workspace --package simple_scheduler

Plan a local package:

Terminal window
dbpm plan ~/repos/my_package --mode upgrade --connect user/pass@db
  • plan never writes to the database or modifies the lockfile.
  • The plan output is the same JSON structure that install, upgrade, and other execution commands use internally. Reviewing it before deployment is good practice for production environments.
  • Environment policy is evaluated in the plan. A policy.result of anything other than allowed means the execution commands will also fail unless --approve is passed.

Source: docs/commands/plan.md