Reconsider showing relationship prose in add column (incidental DDL) confirmations
#28
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From manual testing + a decision to reconsider.
After
add columnin simple mode, the confirmation echoes the fulltable structure including the
References:/Referenced by:relationship prose.
Current behaviour is by design (not a bug)
ADR-0044 §1 deliberately keeps the prose relationship form (not
diagrams) for "incidental DDL auto-shows", explicitly listing
add column, with the rationale: "a simpleadd columnon aheavily-related table should not print a wall of diagrams." So
diagrams were never meant to reach this surface; the prose is the
ADR-0016 §5 behaviour, retained.
The reconsideration
The deeper question is whether an
add columnconfirmation shouldshow relationship information at all — neither prose nor diagram.
Owner preference: do NOT show the
References:/Referenced by:relationship info in the kind of confirmation outputthat
add columndisplays. The confirmation should focus on thechange just made (the new column / updated structure), not re-print
the table's relationships, which the user didn't touch.
This revisits a decided area (ADR-0016 §5 / ADR-0044 §1), so it should
land as a new ADR that supersedes the relevant part: define what
the incidental-DDL confirmation echo includes (structure yes;
relationship prose no), and confirm the scope (just
add column, orall incidental DDL:
create table,add/drop/rename/change column,add/drop index).Implemented in
8ac3537— ADR-0050 (incidental-DDL confirmations omit relationship info).Incidental-DDL confirmation echoes —
create table,add/drop/rename/change column,add/drop index— now render structure only (header + column box +Indexes:+ constraints), with noReferences:/Referenced by:block (neither prose nor diagram), even when the table carries relationships the user didn't touch.Decisions (both user-confirmed):
add column) — the rationale ("confirm the change, not untouched relationships") is uniform, the mental model is cleaner, and it's the simpler edit.relationship_prose_lines+cols_disp) rather than kept dormant — no dead code. The prose format survives in ADR-0016 §5 + git history for a future OOS-7 always-prose display setting.Unchanged: relationship-subject surfaces —
show table,add/drop relationship,show relationship— keep their ADR-0044 diagrams. Relationships appear only when the user asks for (show table) or acts on (add/drop relationship) one, and are oneshow table <T>away — no information lost.Mechanism: the
handle_dsl_successdiagram-vs-structure routing is unchanged; the change is one line insiderender_structure(all its callers are incidental DDL).ADR provenance: ADR-0050 supersedes ADR-0044 §1's incidental-DDL prose clause and the relationship-block half of ADR-0016 §5 (both annotated with superseding notes).
Tests: prose-presence unit test + snapshot removed; new unit test locks structure-only with inbound+outbound relationships present; the misnamed
add_relationship_flow_shows_inbound_section_on_parentintegration test (which sent anAddColumn) inverted + renamed. 2458 pass / 0 fail / 0 skip (1 ignored), clippy clean.