{% extends "base_table.html" %}
{% block extra_scripts %}
{% endblock %}
{% block structure_tab_class %}active{% endblock %}
{% block inner_content %}
SQL
{{ table_sql }}
Add column
Columns
Column |
Data type |
Allow null |
Primary key |
Actions |
{% for column in columns %}
{{ column.name }} |
{{ column.data_type }} |
{% if column.null %}
{% endif %}
|
{% if column.primary_key %}
{% endif %}
|
Rename
|
Drop
|
{% endfor %}
{% if foreign_keys %}
Foreign Keys
Column |
Destination |
{% for foreign_key in foreign_keys %}
{{ foreign_key.column }} |
{{ foreign_key.dest_table }}.{{ foreign_key.dest_column }} |
{% endfor %}
{% endif %}
Add index
Indexes
Name |
Columns |
Unique |
SQL |
Drop? |
{% for index in indexes %}
{{ index.name }} |
{% if index.columns|length == 1 %}
{{ index.columns[0] }}
{% else %}
{% for column in index.columns %}
{{ column }}
{% endfor %}
{% endif %}
|
{% if index.unique %}
{% endif %}
|
SQL
{{ index.sql }}
|
Drop
|
{% endfor %}
{% if triggers %}
{#
Add trigger
#}
Triggers
Name |
SQL |
{% for trigger in triggers %}
{{ trigger.name }} |
SQL
{{ trigger.sql }}
|
{% endfor %}
{% endif %}
{% endblock %}