retrofit0.10.0-wip.8

retrofit

Get started

Getting startedInstall retrofit, build a small schema, read the oplog it writes, and emit DDL.

Concepts

ConceptsThe mental model behind retrofit, the oplog, the cut and element identity.
PrinciplesThe rules retrofit upholds, and why some things are not configurable.

Guides

importBootstrap an oplog from existing .sql files.
driftReconcile the oplog with a schema changed out of band.
snapshotEmit canonical DDL for the schema at a cut.
migrateEmit the migration script between two cuts.
dataWork with the data corpus, the row data kept beside the oplog.

Command reference

retrofitSchema evolution CLI
retrofit dataWork with the data corpus
retrofit data captureCapture a dump’s observed rows onto the data corpus
retrofit data checkCheck data-corpus files against the data-file grammar
retrofit data listList the data fold the emit verbs would apply
retrofit data repinRe-point one corpus data file’s anchor-op at an opid you name
retrofit data retireWithdraw a data chain by name, minting an empty floor at the head
retrofit data scaffoldMint an empty data-corpus file carrying declared metadata axes
retrofit data witnessWitness reference-data records: bind their bytes to the oplog
retrofit driftReconcile an oplog with an out-of-band .sql
retrofit identifyReport which cut a pg_dump –schema-only is at, and how it has diverged
retrofit importImport one or more .sql files into an oplog
retrofit initInitialize a new retrofit project
retrofit migrateEmit a one-way migration script between two cuts
retrofit opEdit the oplog
retrofit op addAppend a new operator instance to the active oplog
retrofit op compactDrop the oplog’s traces (tombstones, replaces=) to a bound
retrofit op infoPrint an operator’s reference entry, or the whole catalog with –dump
retrofit op removeDrop one or more unsealed ops from the oplog
retrofit op revisePatch bound parameters on an unsealed op
retrofit op sealSeal the unsealed tail of the oplog
retrofit op showRender ops from the oplog
retrofit op truncateRewind the oplog to a checkpoint by removing a suffix of ops
retrofit op unsealDemote the most-recent N Seal record(s), keeping their ops as unsealed tail
retrofit opsRun bulk maintenance over the oplog
retrofit ops upgrade-sql-bodiesUpgrade LANGUAGE sql opaque function bodies to BEGIN ATOMIC
retrofit reconcileClose concurrent forks in the oplog by rebasing onto a linear tail
retrofit schemaManage registered schemas
retrofit schema createCreate a new oplog and register the schema
retrofit schema engineRead or set a schema’s engine version (production pin + emit target)
retrofit schema formPrint or switch the oplog’s form line (merge or compact)
retrofit schema listList registered schemas (name, path, engine version, default marker)
retrofit schema moveMove a schema’s oplog to another directory
retrofit schema ref-tablesRead or edit a schema’s reference-data capture policy
retrofit schema ref-tables addDeclare one or more tables as the schema’s reference data
retrofit schema ref-tables removeUndeclare one or more of the schema’s reference-data tables
retrofit schema removeRemove a registered schema (deletes the oplog file by default)
retrofit schema scopeManage [directory_scope] entries
retrofit schema scope addAdd a [directory_scope] entry
retrofit schema scope removeRemove a [directory_scope] entry
retrofit schema set-defaultSet or clear default_schema in retrofit.toml
retrofit snapshotEmit canonical DDL for the materialized schema
retrofit validateValidate retrofit.toml, project layout, and the oplog

Reference

OperatorsEvery schema modification operator and its status.
Output contractWhat each command prints, on which stream, in which shape, and its exit code.
Advisory codesEvery advisory code, its class and its register.
pg_dump parityHow snapshot’s output covers each pg_dump –schema-only option.
PostgreSQL versionsWhich PostgreSQL majors are supported, and what each verb does at each one.

Release notes

Release notesWhat each release changed.

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