{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %}
{{ message }}
{% endfor %} {% endif %} {% endwith %}

Структура таблицы {{ table_name }}

Данные Добавить столбец

Столбцы

{% for column in columns %} {% endfor %}
Имя Тип Nullable Default Primary Key
{{ 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' }}
{% if foreign_keys %}

Внешние ключи

{% for fk in foreign_keys %} {% endfor %}
Столбец Ссылается на таблицу Ссылается на столбец
{{ fk.constrained_columns|join(', ') }} {{ fk.referred_table }} {{ fk.referred_columns|join(', ') }}
{% endif %} {% if indexes %}

Индексы

{% for index in indexes %} {% endfor %}
Имя Столбцы Уникальный
{{ index.name }} {{ index.column_names|join(', ') }} {{ 'Yes' if index.unique else 'No' }}
{% endif %}