docs: handoff 23 — ADR-0029 complete; tick C3

ADR-0029 (column constraints — NOT NULL / UNIQUE / CHECK /
DEFAULT) is fully implemented across the handoff-22 and
handoff-23 sessions. Ticks requirement C3, and corrects
ADR §10's CHECK-error wording to the compiled-SQL form per
the §7 storage deviation.
This commit is contained in:
claude@clouddev1
2026-05-19 18:56:50 +00:00
parent 5e97f6ac6a
commit a049ff9aa0
3 changed files with 184 additions and 7 deletions
+7 -3
View File
@@ -146,17 +146,21 @@ handoff-14 cleanup; 449 after B2/C2.)
refused with friendly messages (drop the relationship
first); SQLite STRICT enforces type compatibility on the
data copy during a type change.
- [ ] **C3** Schema constraints: primary key (single and
- [x] **C3** Schema constraints: primary key (single and
compound), foreign key with `ON DELETE` / `ON UPDATE` referential
actions, indexes, `NOT NULL`, `UNIQUE`, `CHECK`, `DEFAULT`.
*(Progress: PK including compound done at create-table time;
*(PK including compound done at create-table time;
FK with `ON DELETE` / `ON UPDATE` actions done (ADR-0013) —
declared via `add 1:n relationship`; symmetric outbound +
inbound view in the structure renderer; type compatibility
validated at declaration via `Type::fk_target_type()`.
Indexes done (ADR-0025) — `add index` / `drop index`,
rebuild-preserving, persisted in `project.yaml`.
`NOT NULL`, `UNIQUE`, `CHECK`, `DEFAULT` still pending.)*
`NOT NULL` / `UNIQUE` / `CHECK` / `DEFAULT` done (ADR-0029) —
a constraint suffix on `create table` / `add column`, plus
`add constraint` / `drop constraint` on existing columns;
populated-column additions are guarded by a pre-flight
dry-run that refuses with a table of offending rows.)*
- [~] **C3a** Modify relationship: `modify relationship <name>
[on delete <action>] [on update <action>]`. Users can achieve
the same via drop + add today; one-step modify is a small