{# The columns page's body — crate::pages::admin::table_definition::ui::ColumnsFragment. Both writes on this page swap it, so it carries the outcome as well as the forms. #} {% include "pages/admin/table_definition/feedback.html" %} {% if page.table_is_writable() %} {# Append columns. The panel stages columns without writing anything; the selection travels in the URL so the posted fields are exactly the ones the Add-table builder posts, and both are decoded by the same code. #}

Add columns to {{ page.selection.table }}

Columns are appended. Nothing that already exists is changed, and the new columns can be indexed as they are added.

{% include "pages/admin/table_definition/column_panel.html" %}
{% if let Some(detail) = page.detail %}

Rename a column

Renames what the column is called, not the physical column underneath, so stored data and scripts are untouched. Only possible while the table has no rows.

{% endif %} {% endif %} {% if let Some(detail) = page.detail %}

Columns it has now {{ detail.columns.len() }}

{% for column in detail.columns %} {% endfor %}
ColumnTypeNotes
{{ column.name }} {{ column.field_type }}{% if !column.sql_type.is_empty() %} {{ column.sql_type }}{% endif %} {%- for flag in column.flags() %}{{ flag }}{% endfor -%}
{% if !detail.scripts.is_empty() %}

Scripts

{% for script in detail.scripts %} {% endfor %}
Target columnTypeDescription
{{ script.target_column }} {{ script.target_column_type }} {{ script.description }}
source
{{ script.script }}
{% endif %}
{% endif %}