max / makenotwork
| 1 | -- Rename the host-build tier from "mm" to "host". ยง6.5 step 10 of |
| 2 | -- launchplan_final.md (folded into Session 1 since we're already touching |
| 3 | -- topology code). "mm" was misleading โ sandod runs on whatever machine |
| 4 | -- ends up being the Sando host (currently pop-os, not a MakeMachine). |
| 5 | -- |
| 6 | -- All five tables that key by tier name get the same UPDATE. SQLite defers |
| 7 | -- FK checks to commit when defer_foreign_keys is on inside a transaction, |
| 8 | -- so order between parent (tiers) + children (nodes, deploys, gate_runs, |
| 9 | -- tier_state) doesn't matter โ the transaction is consistent at COMMIT. |
| 10 | -- sqlx wraps each migration in a transaction. |
| 11 | |
| 12 | PRAGMA defer_foreign_keys = ON; |
| 13 | |
| 14 | UPDATE tiers SET name = 'host' WHERE name = 'mm'; |
| 15 | UPDATE nodes SET tier = 'host' WHERE tier = 'mm'; |
| 16 | UPDATE deploys SET tier = 'host' WHERE tier = 'mm'; |
| 17 | UPDATE gate_runs SET tier = 'host' WHERE tier = 'mm'; |
| 18 | UPDATE tier_state SET tier = 'host' WHERE tier = 'mm'; |
| 19 |