Expected facts are assertions only; compiler output is the source of truth.

highlighted = computed this step

Honest by construction

Each lesson compiles raw table and step inputs, turns recomputed facts into expected assertions, then compiles again.

expected is assertion only\text{expected is assertion only}

Show the guarded migration

The guarded migration has 5 steps and 2 changed rows.

steps=5\text{steps}=5

Schema-change examples are tiny finite table transforms; SQL dialects, online migration algorithms, locks, performance, ORMs, compliance, and operational runbooks are out of scope.

Guarded schema facts: beforeidname1Ada2Bo ordered schema stepsstepop1add_column_default2backfill_column3copy_column4rename_column5drop_column step snapshotsstepopcolumnsrows0start[id, name]21add_column_default[id, name, age]22backfill_column[id, name, age]23copy_column[id, name, age, label]24rename_column[id, name, age, display_name]25drop_column[id, age, display_name]2 final tableidagedisplay_name137Ada229Bo changed columnskindcolumnsadded[age, display_name]removed[name]kept[id] changed rowsrowbeforeafter0[1, Ada][1, 37, Ada]1[2, Bo][2, 29, Bo] safety factsfactvaluestepCount5rowCount2columnCount3changedRowCount2

Try to tamper

Wrong expected facts, derived sidecars, missing columns, duplicate columns, and malformed rows fail closed.

fail closed before render\text{fail closed before render}

Summary

Book eighteen stays inside exact finite table-shape transformations.

recomputed schema facts\text{recomputed schema facts}