Columns and appending
The columns page at /admin/tables/columns appends columns to an existing
table through AddTableColumns. It is entered from the admin panel with
?profile=<name>&table=<name>.
Routes
Section titled “Routes”| Method | Route | Purpose |
|---|---|---|
GET |
/admin/tables/columns |
renders the page |
POST |
/admin/tables/columns/builder |
stages a column without writing |
POST |
/admin/tables/columns |
adds the staged columns |
The append panel
Section titled “The append panel”The append panel reuses the create-table builder’s vocabulary with two differences:
- creation-only types are not offered, because their schema-managed companion columns cannot be bolted onto a table that already exists;
- the panel names its own columns, so there is no alias step here. The only generated columns it can produce are the phone and IBAN companions, which it does not offer to rename — the table’s rename form is where that is done.
Staging a column (add, remove, toggle-index) changes nothing on the server; it swaps the column panel only. A table must be selected and at least one column described before the write is attempted.
The write
Section titled “The write”The draft is validated with the same checks the server runs — including a
draft rebuilt from a posted form rather than through the panel. On success the
panel reports how many columns were added, shows the DDL the backend reported,
and clears back to an empty append panel. A refusal answers 422 with the
backend’s message.
The selected table must be writable; a system table offers no append panel.