{% extends base %}

{% block body %}

{% from xutils import encode_base64 %}
{% init table_name = "" %}
{% init error     = "" %}
{% init cost_time = None %}
{% init path      = "" %}
{% init path_list = [] %}
{% init sql       = "" %}
{% init keys      = [] %}

<div class="card">
    <div class="card-title">
        <span>{{T("表结构")}} - {{table_name}}</span>
        <div class="float-right">
            {% include common/button/back_button.html %}
        </div>
    </div>
</div>

<div class="card">
    <div class="card-title">
        <span>字段</span>
        <a href="{{_server_home}}/system/sqldb_detail?name={{table_name}}&dbpath={{quote(dbpath)}}">查询数据</a>
    </div>
    {% render column_table %}
</div>

<div class="card">
    <div class="card-title">
        <span>索引</span>
    </div>
    {% render index_table %}
</div>

<div class="card">
    <div class="card-title">
        <span>建表语句</span>
    </div>
    <textarea class="row" rows="20">{{create_sql}}</textarea>
</div>

{% end %}

{% block body_right %}
    {% include common/sidebar/default.html %}
{% end %}
