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.
Usage:
retrofit schema engine [<version>] [flags]
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 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/current/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. Locked at mint-time; ratchet forward only
via this verb.
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.