A wrong order can leave placeholder values.

highlighted = computed this step

Migration order mistake

A bad order can leave placeholder values instead of copied values.

order mistake\text{order mistake}

Show the mistake

The mistaken migration has 2 steps and changes 2 rows.

changed rows=2\text{changed rows}=2

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

Migration order mistake: beforeidname1Ada2Bo ordered schema stepsstepop1add_column_default2drop_column step snapshotsstepopcolumnsrows0start[id, name]21add_column_default[id, name, display_name]22drop_column[id, display_name]2 final tableiddisplay_name1missing2missing changed columnskindcolumnsadded[display_name]removed[name]kept[id] changed rowsrowbeforeafter0[1, Ada][1, missing]1[2, Bo][2, missing] safety factsfactvaluestepCount2rowCount2columnCount2changedRowCount2

Spot the placeholder

The final table has a new column, but the original names were not copied first.

placeholder not copy\text{placeholder not copy}

Summary

The diagram shows the mistake without turning it into production migration advice.

visible mistake\text{visible mistake}