{% extends 'dashboard.html' %} {% block page %}
Explore your database structure and run queries on your data.
erDiagram
{% for table in schema_info %}
{{ table.table_name|upper }} {
{% for col in table.columns %} {{ col.data_type|replace(' ', '_') }} {{ col.column_name }}{% if col.column_name in table.primary_keys %} PK{% endif %}
{% endfor %} }
{% endfor %}
{% for table in schema_info %}
{% for fk in table.foreign_keys %}
{{ table.table_name|upper }} }|--|| {{ fk.foreign_table_name|upper }} : "{{ fk.column_name }}"
{% endfor %}
{% endfor %}
Run SELECT queries on your data. Queries are automatically scoped to your user account for security.
{{ table.columns|length }} column{{ 's' if table.columns|length != 1 else '' }} {% if table.primary_keys %} ยท {{ table.primary_keys|length }} PK {% endif %}
References: