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.

Glossary

The terms retrofit coins, one entry each. An entry uses the words of --help where --help defines the term, and links to the section that explains it.

anchor

A canonical anchor, root, last or seal, names a cut by position, with an optional ^ or ~N decrement; a data record’s anchor is the op it is filed under, its anchor-op (Stale data references and repair).

attestation

A fact you state that retrofit cannot observe, made by a flag that names the fact (--allow-external-atomicity attests that the apply context owns transaction atomicity) or by running a command that is the attestation itself (op unseal), which answers an advisory or clears a refusal (Attestation).

band

A part of the row data set apart by purpose: the ref band holds reference rows, which apply with no flag, the seed band holds the rows a --label selects, and snapshot emits the rows it applies as its data band (The data band).

An input that clears a refusal a verb would otherwise raise, spelled the same on every verb that takes the fact it names, of one of two kinds, apply context or sealed history (Consents).

cut

A point in the oplog, named by an opid prefix or an anchor, and the schema as it stands after the ops up to it replay: snapshot --at renders one, and a migration runs from one cut to another (The cut).

decrement

The optional ^ or ~N after an anchor that steps it toward older operations, one step or N: seal^ is the Seal before the latest, and last~2 is two operations before the last (The window).

ElementID

The identity of an element (a schema, a table, a column, a constraint and the rest), minted by the op that creates it and kept through a rename, so an element is its ElementID (ElementID).

envelope

The transactional context a migration file is applied in, which --envelope declares as own, caller or independent (Who owns the transaction); in JSON output, the terminal ok, failed or unverifiable record that ends a run (json mode).

fork

Two or more ops sharing the same prev=, a branch point with more than one successor, which a merge of two branches leaves and reconcile closes by rebasing onto a linear tail (When two branches change the oplog).

genealogy

The forest replay builds from the oplog, a content-addressed tree in which each element is a vertex and each op contributes one or more edges, which snapshot, op add validation and drift read the schema from (Replay and genealogy).

opid

The 12-hex id of an op, the first field of its line in the oplog, which --from, --to and --at accept as any prefix that matches one opid (The oplog).

oplog

The append-only log of DDL operators (ops), one per line, that records how a schema changes and materializes into canonical SQL (The oplog).

seal

A Seal is the record op seal appends to cover every op from the first unsealed op through the current tail, so a later edit to one of them is detected; to seal is to append one, and the seal anchor names the cut after the latest Seal (Sealed and unsealed ops).

segment

One of the independently committing parts a migration window emits as, rather than one all-or-nothing script, when it holds an operator that needs the enclosing transaction closed around it (Segmented scripts).

tail

The unsealed tail is every op after the most recent Seal, which op revise and op remove may still change; the tail alone is the end of the oplog, its most recent ops in line order (Sealed and unsealed ops).

window

The operations a migration covers, (from, to]: those after the --from cut, up to and including the --to cut, by default the migration window since the latest Seal (The window).

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

Published .