Grammar: with-pk column specs use name(type), matching add column

`create table … with pk` parsed column types as `name:type`,
while `add column` uses `name(type)`. Unify on the parens
form so column-type syntax is consistent across the DSL:

    create table T with pk id(serial), name(text)

Only `COL_SPEC` changes (`:` → `( … )`); `build_create_table`
reads columns by role, so it is unaffected. The `:` that
separates table from column in `add column` / `drop column`
is unchanged. Sweeps the test suite, the typing-surface
matrix (two `after_colon` cells renamed to `after_paren`,
4 snapshots regenerated), the friendly catalog's usage
templates, ADR-0009's example, and requirements.md.

1039 passing / 0 failing / 1 ignored; clippy clean.
This commit is contained in:
claude@clouddev1
2026-05-18 21:51:52 +00:00
parent 9aa7e2ede0
commit d9a98bbd49
20 changed files with 68 additions and 67 deletions
@@ -26,7 +26,7 @@ The DSL surface follows three rules.
Required parts of a command are written in plain words and
read like English. Examples:
- `create table <Name> with pk <name>:<type>`
- `create table <Name> with pk <name>(<type>)`
- `add column to table <Name>: <Name> (<Type>)`
- `drop table <Name>`
+1 -1
View File
@@ -209,7 +209,7 @@ group enabled. (Earlier reference points: 1006 after ADR-0024
alphabet and length range.)*
- [ ] **T3** Compound primary keys handled end-to-end (DSL,
storage, display, FK reference).
*(Progress: DSL grammar (`with pk a:int,b:int`), storage, and
*(Progress: DSL grammar (`with pk a(int),b(int)`), storage, and
table-info description are all present; the FK iteration
references single-column PKs only — compound-key FK references
remain pending.)*