A plan MUST be the ordered steps from the state a database is in (or from none, an empty database) to the state wanted, each with the hash of the state it needs and of the state it leaves, an identifier made of its content, a name a person reads, its class, its reversibility, the statements that do it and, where it has one, the statements that undo it, and the logical elements it is made from; a plan between equal states MUST have no step; the order MUST be renames, then drops of constraints and indexes, then changes of columns, then new tables, then new constraints, indexes and rows, then drops of tables.
Enforced (check): .github: cd commons/data && bun run verify — suite/lifecycle.test.ts: a plan has the ordered steps with the hash of the state each needs and leaves, an identifier made of its content, and none between equal states
Proved by: data/suite/lifecycle.test.ts
Written in: data/sql/lifecycle/plan.ts
Tests: passed: suite/lifecycle.test.ts a plan has the ordered steps with the hash of the state each needs and leaves, an identifi