Files
zeekay b2db7a9609 a move that adopts a table also has to adopt the columns it grew
Adopting the table is only half of it. Where the table already comes from
`insights.0001_initial`, it arrives with the shape the squash froze, and the move declares
fields added after that -- in state only, so nothing ever adds the columns. A fresh
`migrate` got as far as the first migration that touched one and died at

    column "button_tile_id" does not exist

Forty columns across nine migrations, found by walking the migration plan and carrying the
schema the database operations actually produce alongside the state they advance, then
comparing the two. Every one confirmed absent against a database built from empty; the
eleven the walk also flagged are there, and are artifacts of reading raw SQL with a regex.

`AddColumnIfNotExists` is the same instrument as the table half and is right in the same
two directions: it takes the field from state, so it cannot drift from what a fresh install
gets, and it skips a column that is already there -- which is every column on production
and every column on a table this migration built itself a few lines earlier.
2026-08-09 07:41:34 -07:00
..