1 <fieldset class="index_info">
2 <legend id="index_header">
4 {{ show_mysql_docu('optimizing-database-structure') }}
7 {% if indexes is not empty %}
8 {{ indexes_duplicates|raw }}
10 <div class="responsivetable jsresponsive">
11 <table class="pma-table" id="table_index">
14 <th colspan="2" class="print_ignore">{% trans 'Action' %}</th>
15 <th>{% trans 'Keyname' %}</th>
16 <th>{% trans 'Type' %}</th>
17 <th>{% trans 'Unique' %}</th>
18 <th>{% trans 'Packed' %}</th>
19 <th>{% trans 'Column' %}</th>
20 <th>{% trans 'Cardinality' %}</th>
21 <th>{% trans 'Collation' %}</th>
22 <th>{% trans 'Null' %}</th>
23 <th>{% trans 'Comment' %}</th>
27 {% for index in indexes %}
28 <tbody class="row_span">
29 {% set columns_count = index.getColumnCount() %}
31 <td rowspan="{{ columns_count }}" class="edit_index print_ignore ajax">
32 <a class="ajax" href="{{ url('/table/indexes') }}" data-post="{{ get_common(url_params|merge({'index': index.getName()}), '') }}">
33 {{ get_icon('b_edit', 'Edit'|trans) }}
36 <td rowspan="{{ columns_count }}" class="print_ignore">
37 {% if index.getName() == 'PRIMARY' %}
38 {% set index_params = {
39 'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ ' DROP PRIMARY KEY;',
40 'message_to_show': 'The primary key has been dropped.'|trans
43 {% set index_params = {
44 'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ ' DROP INDEX ' ~ backquote(index.getName()) ~ ';',
45 'message_to_show': 'Index %s has been dropped.'|trans|format(index.getName())
49 <input type="hidden" class="drop_primary_key_index_msg" value="{{ index_params.sql_query|js_format(false) }}">
51 url('/sql', url_params|merge(index_params)),
52 get_icon('b_drop', 'Drop'|trans),
53 {'class': 'drop_primary_key_index_anchor ajax'}
56 <th rowspan="{{ columns_count }}">{{ index.getName() }}</th>
57 <td rowspan="{{ columns_count }}">{{ index.getType()|default(index.getChoice()) }}</td>
58 <td rowspan="{{ columns_count }}">{{ index.isUnique() ? 'Yes'|trans : 'No'|trans }}</td>
59 <td rowspan="{{ columns_count }}">{{ index.isPacked()|raw }}</td>
61 {% for column in index.getColumns() %}
62 {% if column.getSeqInIndex() > 1 %}
66 {{ column.getName() }}
67 {% if column.getSubPart() is not empty %}
68 ({{ column.getSubPart() }})
71 <td>{{ column.getCardinality() }}</td>
72 <td>{{ column.getCollation() }}</td>
73 <td>{{ column.getNull(true) }}</td>
75 {% if column.getSeqInIndex() == 1 %}
76 <td rowspan="{{ columns_count }}">{{ index.getComments() }}</td>
85 <div class="no_indexes_defined">{{ 'No index defined!'|trans|notice }}</div>