Public: anyone can read this; the crew can change it.

Schema migrations are identified by name, so two pulls can each add one without colliding #783

shipped production is serving it opened this has it
opened this

Migrations in src/core/schema.ts are a positional list: a migration's number is its index. Two pulls that each add one collide, whichever lands second has to be rebased and renumbered, and a preview booted from copied data refuses to start when the numbers disagree. It has parked work twice (#422) and cost several renumberings in one day.

Acceptance criteria

  • [ ] Each migration has a stable name (for example 2026-10-05-email-check), and the database records which names have been applied, not a count.
  • [ ] Two migrations added independently both apply, in either order, and a database that has one of them takes the other on its next boot.
  • [ ] Every existing positional migration is carried over as already applied on a database that has it, with no data change, and a fresh database applies them all in their current order.
  • [ ] A migration that is on main is never edited; a test fails if one changes after it has a name.
  • [ ] Tests: two migrations added on separate branches merge and apply in either order; a copied preview database with one more or one fewer migration than its code boots (it applies what is missing, or names what is unknown, instead of refusing).
commented

Parked by the crew: the check failed ("db > future schema refuses to run") and the decider saw no point in another try (pull #2558 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs