{% trans 'Partitions' %} {{ show_mysql_docu('partitioning') }} {% if partitions is empty %} {{ 'No partitioning defined!'|trans|notice }} {% else %}

{% trans 'Partitioned by:' %} {{ partition_method }}({{ partition_expression }})

{% if has_sub_partitions %}

{% trans 'Sub partitioned by:' %} {{ sub_partition_method }}({{ sub_partition_expression }})

{% endif %} {% if has_description %} {% endif %} {% for partition in partitions %} {% if has_sub_partitions %} {% else %} {% endif %} {% if has_description %} {% endif %} {% if range_or_list %} {% endif %} {% if has_sub_partitions %} {% for sub_partition in partition.getSubPartitions() %} {% if has_description %} {% endif %} {% endfor %} {% endif %} {% endfor %}
# {% trans 'Partition' %}{% trans 'Expression' %}{% trans 'Rows' %} {% trans 'Data length' %} {% trans 'Index length' %} {% trans 'Comment' %} {% trans 'Action' %}
{{ partition.getOrdinal() }} {{ partition.getOrdinal() }}{{ partition.getName() }} {{- partition.getExpression() -}} {{- partition.getMethod() == 'LIST' ? ' IN (' : ' < ' -}} {{- partition.getDescription() -}} {{- partition.getMethod() == 'LIST' ? ')' -}} {{ partition.getRows() }} {% set data_length = format_byte_down( partition.getDataLength(), 3, 1 ) %} {{ data_length[0] }} {{ data_length[1] }} {% set index_length = format_byte_down( partition.getIndexLength(), 3, 1 ) %} {{ index_length[0] }} {{ index_length[1] }} {{ partition.getComment() }} {{ get_icon('b_search', 'Analyze'|trans) }} {{ get_icon('eye', 'Check'|trans) }} {{ get_icon('normalize', 'Optimize'|trans) }} {{ get_icon('s_tbl', 'Rebuild'|trans) }} {{ get_icon('b_tblops', 'Repair'|trans) }} {{ get_icon('b_empty', 'Truncate'|trans) }} {{ get_icon('b_drop', 'Drop'|trans) }}
{{ sub_partition.getOrdinal() }} {{ sub_partition.getName() }}{{ sub_partition.getRows() }} {% set data_length = format_byte_down( sub_partition.getDataLength(), 3, 1 ) %} {{ data_length[0] }} {{ data_length[1] }} {% set index_length = format_byte_down( sub_partition.getIndexLength(), 3, 1 ) %} {{ index_length[0] }} {{ index_length[1] }} {{ sub_partition.getComment() }}
{% endif %}

{{ get_hidden_inputs(db, table) }} {% if partitions is empty %} {% else %} {{ link_or_button( url('/sql'), { 'db': db, 'table': table, 'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ ' REMOVE PARTITIONING' }, 'Remove partitioning'|trans, { 'class': 'btn btn-secondary ajax', 'id': 'remove_partitioning' }) }} {% endif %}