feat: ADR-0035 4f — ALTER TABLE … ALTER COLUMN TYPE
Fourth AlterTableAction (AlterColumnType), runtime-decomposed to the existing change_column_type executor with ForceConversion — which IS the §7 advanced policy: lossy converts with a note (no force flag), incompatible + the ADR-0017 static refusals (↔blob, same-type, date↔datetime, non-int→serial) still refuse, while int→serial is allowed (auto-fills nulls + UNIQUE, ADR-0018 §8). No new mode/note/persistence; undo is the advanced safety net. Grammar adds a fourth action branch leading on `alter`, discriminated in the builder by the `type` keyword (unique — ADD COLUMN's type is an ident); the type slot reuses SQL_TYPE. The internal-__rdbms_* guard was folded into do_change_column_type (user-confirmed), closing the simple `change column` exposure. Tests: 7 Tier-3 e2e via run_replay + 4 Tier-1 parse (incl. a column-named- `type` discriminator probe) + the simple-surface guard. Help/usage refreshed; ADR-0035 §13 4f + README + requirements.md in lockstep.
This commit is contained in:
@@ -234,9 +234,13 @@ handoff-14 cleanup; 449 after B2/C2.)
|
||||
then `ALTER TABLE` add/drop/rename column (4e — `alter` is advanced-only,
|
||||
runtime-decomposed to the existing column executors; ADD COLUMN reaches
|
||||
CREATE-TABLE constraint parity; drop/rename refuse a table-CHECK-
|
||||
referenced column)).
|
||||
Remaining DDL — `ALTER TABLE … ALTER COLUMN TYPE` / add-drop-constraint /
|
||||
add-FK / `RENAME TO` (4f–4h) — is phased per ADR-0035 §13.)*
|
||||
referenced column), then `ALTER TABLE … ALTER COLUMN TYPE` (4f —
|
||||
runtime-decomposed to `change_column_type` with `ForceConversion`, the
|
||||
§7 advanced policy: lossy converts with a note, incompatible + static
|
||||
refusals (`↔ blob`, non-`int → serial`) refuse, `int → serial` allowed;
|
||||
the internal-`__rdbms_*` guard folded into `do_change_column_type`)).
|
||||
Remaining DDL — `ALTER TABLE` add-drop-constraint / add-FK / `RENAME TO`
|
||||
(4g–4h) — is phased per ADR-0035 §13.)*
|
||||
- [ ] **Q2** Non-standard syntax rejected with a clear message
|
||||
pointing at the supported subset.
|
||||
*(Design done — ADR-0030 §8: out-of-subset statements are
|
||||
|
||||
Reference in New Issue
Block a user