{{ database }}

{% if comment is not empty %}

{% trans 'Database comment:' %} {{ comment }}

{% endif %}

{% for table in tables %}

{{ table.name }}

{% if table.comment is not empty %}

{% trans 'Table comments:' %} {{ table.comment }}

{% endif %} {% if table.has_relation %} {% endif %} {% if table.has_mime %} {% endif %} {% for column in table.columns %} {% if table.has_relation %} {% endif %} {% if table.has_mime %} {% endif %} {% endfor %}
{% trans 'Column' %} {% trans 'Type' %} {% trans 'Null' %} {% trans 'Default' %}{% trans 'Links to' %}{% trans 'Comments' %}{% trans 'Media type' %}
{{ column.name }} {% if column.has_primary_key %} ({% trans 'Primary' %}) {% endif %} {{ column.print_type }} {{ column.is_nullable ? 'Yes'|trans : 'No'|trans }} {% if column.default is null and column.is_nullable %} NULL {% else %} {{ column.default }} {% endif %} {{ column.relation }}{{ column.comment }}{{ column.mime }}
{% if table.indexes is not empty %}

{% trans 'Indexes' %}

{% for index in table.indexes %} {% set columns_count = index.getColumnCount() %} {% for column in index.getColumns() %} {% if column.getSeqInIndex() > 1 %} {% endif %} {% if column.getSeqInIndex() == 1 %} {% endif %} {% endfor %} {% endfor %}
{% trans 'Keyname' %} {% trans 'Type' %} {% trans 'Unique' %} {% trans 'Packed' %} {% trans 'Column' %} {% trans 'Cardinality' %} {% trans 'Collation' %} {% trans 'Null' %} {% trans 'Comment' %}
{{ index.getName() }} {{ index.getType()|default(index.getChoice()) }} {{ index.isUnique() ? 'Yes'|trans : 'No'|trans }} {{ index.isPacked()|raw }}
{{ column.getName() }} {% if column.getSubPart() is not empty %} ({{ column.getSubPart() }}) {% endif %} {{ column.getCardinality() }} {{ column.getCollation() }} {{ column.getNull(true) }}{{ index.getComments() }}
{% else %}

{% trans 'No index defined!' %}

{% endif %}
{% endfor %}