{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
{{ message }}
{% endfor %}
{% endif %}
{% endwith %}
Структура таблицы {{ table_name }}
Столбцы
Имя |
Тип |
Nullable |
Default |
Primary Key |
{% for column in columns %}
{{ column.name }} |
{{ column.type }} |
{{ 'Yes' if column.nullable else 'No' }} |
{{ column.default if column.default else '-' }} |
{{ 'Yes' if column.name in pk_columns else 'No' }} |
{% endfor %}
{% if foreign_keys %}
Внешние ключи
Столбец |
Ссылается на таблицу |
Ссылается на столбец |
{% for fk in foreign_keys %}
{{ fk.constrained_columns|join(', ') }} |
{{ fk.referred_table }} |
{{ fk.referred_columns|join(', ') }} |
{% endfor %}
{% endif %}
{% if indexes %}
Индексы
Имя |
Столбцы |
Уникальный |
{% for index in indexes %}
{{ index.name }} |
{{ index.column_names|join(', ') }} |
{{ 'Yes' if index.unique else 'No' }} |
{% endfor %}
{% endif %}