{% extends "base_table.html" %} {% block extra_scripts %} {% endblock %} {% block structure_tab_class %} active{% endblock %} {% block inner_content %}

SQL

{{ table_sql|format_create_table|highlight }}

{% if not dataset.is_readonly %}

+ Add column

{% endif %} Columns

{% for column in columns %} {% endfor %}
Column Data type Allow null Primary key Actions
{{ column.name }} {{ column.data_type }} {% if column.null %}✓{% endif %} {% if column.primary_key %}✓{% endif %} {% if dataset.is_readonly %} read-only {% else %} Rename | Drop {% endif %}

{% if foreign_keys %}

Foreign Keys

{% for foreign_key in foreign_keys %} {% endfor %}
Column Destination
{{ foreign_key.column }} {{ foreign_key.dest_table }}.{{ foreign_key.dest_column }}

{% endif %}

{% if not dataset.is_readonly %}

+ Add index

{% endif %} Indexes

{% for index in indexes %} {% endfor %}
Name Columns Unique SQL Drop?
{{ index.name }} {% if index.columns|length == 1 %} {{ index.columns[0] }} {% else %}
    {% for column in index.columns %}
  • {{ column }}
  • {% endfor %}
{% endif %}
{% if index.unique %}✓{% endif %} SQL
{% if index.sql %}{{ index.sql|format_index|highlight }}{% else %}-- no sql found --{% endif %}
{% if dataset.is_readonly %} read-only {% else %} Drop {% endif %}
{% if triggers %}

{#

Add trigger

#} Triggers

{% for trigger in triggers %} {% endfor %}
Name SQL Drop?
{{ trigger.name }} SQL
{{ trigger.sql|highlight }}
{% if dataset.is_readonly %} read-only {% else %} Drop {% endif %}
{% endif %} {% endblock %}