dpg resolve

dpg resolve

Resolve drift: adopt, revert, ignore or acknowledge items

Synopsis

Resolves the items dpg verify reports. Run in a terminal without options, it is interactive: choose items in a tree, preview, apply. Otherwise each item is chosen by its ID:

–adopt ID bring the database’s state into the source and snapshot –revert ID change the database back to the declared state –ignore ID add an [ignore] pattern for an object DPG doesn’t manage –ack ID acknowledge the item (with –reason, –expires) –unack ID remove an item’s acknowledgement

–ack and –unack also take an object’s ID (kind:object): every item of the object is acknowledged, or has its acknowledgement removed.

A part declared by a macro spread is adopted only with –macro: edit changes the macro’s definition (every use of it), inline replaces this spread with the macro’s text and changes it there.

Every change is previewed before it is made (–dry-run stops there; –yes skips the question). After writing, the source is compiled and drift is detected again; if a resolved item is still reported or a new one appears, every file, snapshot and acknowledgement change is undone.

Exits 0 when resolved (or nothing to change), 2 on error.

dpg resolve [flags]

Options

      --ack strings         item IDs to acknowledge
      --adopt strings       item IDs to adopt
      --allow-destructive   allow a revert to run DESTRUCTIVE statements
      --cluster string      cluster to resolve (required when multiple clusters exist)
      --database string     database to resolve (required when multiple databases exist)
      --dry-run             show the changes without making them
      --expires string      acknowledgements lapse on this date (YYYY-MM-DD)
  -h, --help                help for resolve
      --ignore strings      item IDs to ignore
      --macro string        adopting a part a macro declares: edit (change the macro, every use) or inline (expand this use)
      --reason string       why the items are acknowledged
      --revert strings      item IDs to revert
      --unack strings       item IDs to unacknowledge
  -y, --yes                 skip the confirmation question

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
Auto generated by spf13/cobra on 12-Oct-2026