retrofit
0.15.0-wip.89
retrofit.sh

These docs are for 0.15.0-wip.89, a WIP, and may describe what no release does yet. The newest release is 0.14.0: this page for 0.14.0.

retrofit schema engine

Read (no <version>) or set (with <version>) a schema's two
engine-version axes: the production pin (oplog header) and
the emit target ([[schema]] engine_version). Default form
sets both axes. Selects schema via --schema or resolver chain.

Synopsis

Usage:
  retrofit schema engine [<version>] [flags]

Options

Flags:
      --config-only     set only the toml target axis (oplog header untouched)
      --dry-run         report the would-action without writing
  -h, --help            help for engine
      --help-all        show extended help (vocabulary, semantics, caveats)
      --schema <name>   registered schema <name> (resolves via the chain when omitted)

Global options

Global Flags:
      --as string        output mode: text | json (default "text")
  -C, --chdir string     treat <dir> as the working directory for the entire run
      --config string    retrofit.toml path (overrides discovery; also accepts $RETROFIT_CONFIG)
  -f, --file string      oplog file path; selects a registered [[schema]] path (overrides discovery)
      --no-consolidate   render every advisory occurrence instead of collapsing repeats
  -q, --quiet count      suppress the advisory tier on stderr; stack (-qq) to drop it whole (errors and results still print)
  -v, --verbose          reveal info-tier advisories on stderr
Docs: https://docs.retrofit.sh/wip/commands/retrofit-schema-engine/

retrofit schema engine --help-all adds:

Extended help:

Two engine-version axes are tracked per schema:

  production pin   the value in the oplog file's `engine-version: <X>`
                   header. Set at mint; this verb moves it up or
                   down. Any move replays the log at the new
                   version; lowering it also refuses
                   `unsupported-on-engine-version` if an op needs a
                   newer major.
  emit target      the value in retrofit.toml under
                   `[[schema]] engine_version`. Used by `snapshot`,
                   `drift`, and `migrate` to choose the DDL dialect.

The two must satisfy `pin <= target` (loader invariant). Default
form sets both axes to <X>; --config-only sets only the target;
--dry-run runs all validation without writing.

Supported PostgreSQL majors in this build: 15, 16, 17, 18.
Every version reads and writes PostgreSQL 17 SQL (this build's syntax
level); PostgreSQL 18-only syntax refuses `syntax-not-available` at
every pin, 18 included.

Before 1.0, any release may change behavior; the release notes list what changed.

Published .