Initial commit
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
<li class="<?= $class; ?>">
|
||||
<?php if ($type == 'text'
|
||||
|| $type == 'blob'
|
||||
|| 'ARCHIVE' == $tbl_storage_engine
|
||||
|| $hasField
|
||||
): ?>
|
||||
<?= $titles['No' . $action]; ?>
|
||||
<?php else: ?>
|
||||
<a rel="samepage" class="ajax add_key print_ignore
|
||||
<?php if ($hasLinkClass): ?>
|
||||
add_primary_key_anchor"
|
||||
<?php elseif ($action=='Index'): ?>
|
||||
add_index_anchor"
|
||||
<?php elseif ($action=='Unique'): ?>
|
||||
add_unique_anchor"
|
||||
<?php elseif ($action=='Spatial'): ?>
|
||||
add_spatial_anchor"
|
||||
<?php else: ?>
|
||||
"
|
||||
<?php endif; ?> href="tbl_structure.php<?= $url_query; ?>&add_key=1&sql_query=<?= urlencode(
|
||||
'ALTER TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table'])
|
||||
. ($isPrimary ? ($primary ? ' DROP PRIMARY KEY,' : '') : '')
|
||||
. ' ' . $syntax . '('
|
||||
. PMA\libraries\Util::backquote($row['Field']) . ');'); ?>&message_to_show=<?= urlencode(sprintf($message, htmlspecialchars($row['Field']))); ?>" >
|
||||
<?= $titles[$action]; ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
141
#pma/templates/table/structure/actions_in_table_structure.phtml
Normal file
141
#pma/templates/table/structure/actions_in_table_structure.phtml
Normal file
@ -0,0 +1,141 @@
|
||||
<td class="print_ignore"><ul class="table-structure-actions resizable-menu">
|
||||
<!-- Add primary -->
|
||||
<?php use PMA\libraries\Util; ?>
|
||||
|
||||
<?= PMA\libraries\Template::get('table/structure/action_row_in_structure_table')->render(
|
||||
array(
|
||||
'type' => $type,
|
||||
'tbl_storage_engine' => $tbl_storage_engine,
|
||||
'class' => 'primary nowrap',
|
||||
'hasField' => ($primary && $primary->hasColumn($field_name)),
|
||||
'hasLinkClass' => true,
|
||||
'url_query' => $url_query,
|
||||
'primary' => $primary,
|
||||
'syntax' => 'ADD PRIMARY KEY',
|
||||
'message' => __('A primary key has been added on %s.'),
|
||||
'action' => 'Primary',
|
||||
'titles' => $titles,
|
||||
'row' => $row,
|
||||
'isPrimary' => true
|
||||
)
|
||||
)
|
||||
?>
|
||||
<!-- Add unique -->
|
||||
<?= PMA\libraries\Template::get('table/structure/action_row_in_structure_table')->render(
|
||||
array(
|
||||
'type' => $type,
|
||||
'tbl_storage_engine' => $tbl_storage_engine,
|
||||
'class' => 'add_unique unique nowrap',
|
||||
'hasField' => in_array($field_name, $columns_with_unique_index),
|
||||
'hasLinkClass' => false,
|
||||
'url_query' => $url_query,
|
||||
'primary' => $primary,
|
||||
'syntax' => 'ADD UNIQUE',
|
||||
'message' => __('An index has been added on %s.'),
|
||||
'action' => 'Unique',
|
||||
'titles' => $titles,
|
||||
'row' => $row,
|
||||
'isPrimary' => false
|
||||
)
|
||||
)
|
||||
?>
|
||||
<!-- Add index -->
|
||||
<?= PMA\libraries\Template::get('table/structure/action_row_in_structure_table')->render(
|
||||
array(
|
||||
'type' => $type,
|
||||
'tbl_storage_engine' => $tbl_storage_engine,
|
||||
'class' => 'add_index nowrap',
|
||||
'hasField' => false,
|
||||
'hasLinkClass' => false,
|
||||
'url_query' => $url_query,
|
||||
'primary' => $primary,
|
||||
'syntax' => 'ADD INDEX',
|
||||
'message' => __('An index has been added on %s.'),
|
||||
'action' => 'Index',
|
||||
'titles' => $titles,
|
||||
'row' => $row,
|
||||
'isPrimary' => false
|
||||
)
|
||||
)
|
||||
?>
|
||||
|
||||
<!-- Add spatial -->
|
||||
<?php $spatial_types = array(
|
||||
'geometry', 'point', 'linestring', 'polygon', 'multipoint',
|
||||
'multilinestring', 'multipolygon', 'geomtrycollection'
|
||||
);
|
||||
?>
|
||||
<?= PMA\libraries\Template::get('table/structure/action_row_in_structure_table')->render(
|
||||
array(
|
||||
'type' => $type,
|
||||
'tbl_storage_engine' => $tbl_storage_engine,
|
||||
'class' => 'spatial nowrap',
|
||||
'hasField' => ! (in_array($type, $spatial_types) && ('MYISAM' == $tbl_storage_engine || PMA_MYSQL_INT_VERSION >= 50705)),
|
||||
'hasLinkClass' => false,
|
||||
'url_query' => $url_query,
|
||||
'primary' => $primary,
|
||||
'syntax' => 'ADD SPATIAL',
|
||||
'message' => __('An index has been added on %s.'),
|
||||
'action' => 'Spatial',
|
||||
'titles' => $titles,
|
||||
'row' => $row,
|
||||
'isPrimary' => false
|
||||
)
|
||||
)
|
||||
?>
|
||||
<!-- FULLTEXT is possible on TEXT, CHAR and VARCHAR -->
|
||||
<li class="fulltext nowrap">
|
||||
<?php if (! empty($tbl_storage_engine)
|
||||
&& ($tbl_storage_engine == 'MYISAM'
|
||||
|| $tbl_storage_engine == 'ARIA'
|
||||
|| $tbl_storage_engine == 'MARIA'
|
||||
|| ($tbl_storage_engine == 'INNODB' && PMA_MYSQL_INT_VERSION >= 50604))
|
||||
&& (mb_strpos($type, 'text') !== false
|
||||
|| mb_strpos($type, 'char') !== false)
|
||||
): ?>
|
||||
<a rel="samepage" class="ajax add_key add_fulltext_anchor" href="tbl_structure.php<?= $url_query; ?>&add_key=1&sql_query=<?= urlencode(
|
||||
'ALTER TABLE ' . Util::backquote($GLOBALS['table'])
|
||||
. ' ADD FULLTEXT(' . Util::backquote($row['Field'])
|
||||
. ');'); ?>&message_to_show=<?= urlencode(sprintf(
|
||||
__('An index has been added on %s.'),
|
||||
htmlspecialchars($row['Field']))); ?>">
|
||||
<?= $titles['IdxFulltext']; ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?= $titles['NoIdxFulltext']; ?>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<!-- Distinct value action -->
|
||||
<li class="browse nowrap">
|
||||
<a href="sql.php<?= $url_query; ?>&sql_query=<?= urlencode(
|
||||
'SELECT COUNT(*) AS ' . PMA\libraries\Util::backquote(__('Rows'))
|
||||
. ', ' . PMA\libraries\Util::backquote($row['Field'])
|
||||
. ' FROM ' . PMA\libraries\Util::backquote($GLOBALS['table'])
|
||||
. ' GROUP BY ' . PMA\libraries\Util::backquote($row['Field'])
|
||||
. ' ORDER BY ' . PMA\libraries\Util::backquote($row['Field'])
|
||||
); ?>&is_browse_distinct=1">
|
||||
<?= $titles['DistinctValues']; ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($GLOBALS['cfgRelation']['centralcolumnswork']): ?>
|
||||
<li class="browse nowrap">
|
||||
<?php if ($isInCentralColumns): ?>
|
||||
<a href="#" onclick="$('input:checkbox').prop('checked', false);
|
||||
$('#checkbox_row_<?= $rownum; ?>').prop('checked', true);
|
||||
$('button[value=remove_from_central_columns]').click();">
|
||||
<?= PMA\libraries\Util::getIcon(
|
||||
'centralColumns_delete.png',
|
||||
__('Remove from central columns')
|
||||
); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="#" onclick="$('input:checkbox').prop('checked', false);
|
||||
$('#checkbox_row_<?= $rownum ?>').prop('checked', true);
|
||||
$('button[value=add_to_central_columns]').click();">
|
||||
<?= PMA\libraries\Util::getIcon(
|
||||
'centralColumns_add.png',
|
||||
__('Add to central columns')
|
||||
); ?></a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul></td>
|
26
#pma/templates/table/structure/add_column.phtml
Normal file
26
#pma/templates/table/structure/add_column.phtml
Normal file
@ -0,0 +1,26 @@
|
||||
<form method="post" action="tbl_addfield.php" id="addColumns" name="addColumns" onsubmit="return checkFormElementInRange(this, 'num_fields', '<?= str_replace('\'', '\\\'', __('You have to add at least one column.')); ?>', 1)">
|
||||
<?= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']); ?>
|
||||
<?php if (PMA\libraries\Util::showIcons('ActionLinksMode')): ?>
|
||||
<?= PMA\libraries\Util::getImage('b_insrow.png', __('Add column')); ?>
|
||||
<?php endif; ?>
|
||||
<?php $num_fields = '<input type="number" name="num_fields" value="1" onfocus="this.select()" min="1" required />'; ?>
|
||||
<?= sprintf(__('Add %s column(s)'), $num_fields); ?>
|
||||
<input type="hidden" name="field_where" value="after"/>
|
||||
<!-- I tried displaying the drop-down inside the label but with Firefox the drop-down was blinking -->
|
||||
<select name="after_field" onchange="checkFirst()">
|
||||
<option value="first" data-pos = "first">
|
||||
<?= __('at beginning of table'); ?>
|
||||
</option>
|
||||
<?php $cols_count = count($columns_list);
|
||||
foreach ($columns_list as $one_column_name): ?>
|
||||
<?php if (--$cols_count == 0): ?>
|
||||
<option value="<?= htmlspecialchars($one_column_name); ?>" selected="selected">
|
||||
<?php else: ?>
|
||||
<option value="<?= htmlspecialchars($one_column_name); ?>">
|
||||
<?php endif; ?>
|
||||
<?= sprintf(__('after %s'), htmlspecialchars($one_column_name)); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type="submit" value="<?= __('Go'); ?>" />
|
||||
</form>
|
56
#pma/templates/table/structure/check_all_table_column.phtml
Normal file
56
#pma/templates/table/structure/check_all_table_column.phtml
Normal file
@ -0,0 +1,56 @@
|
||||
<div class="print_ignore" >
|
||||
<?= PMA\libraries\Util::getWithSelected($pmaThemeImage, $text_dir, "fieldsForm") ?>
|
||||
<?= PMA\libraries\Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_browse',
|
||||
__('Browse'), 'b_browse.png', 'browse'
|
||||
) ?>
|
||||
|
||||
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
|
||||
<?= PMA\libraries\Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit change_columns_anchor ajax',
|
||||
'submit_mult_change', __('Change'), 'b_edit.png', 'change'
|
||||
) ?>
|
||||
<?= PMA\libraries\Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_drop',
|
||||
__('Drop'), 'b_drop.png', 'drop'
|
||||
) ?>
|
||||
|
||||
<?php if ('ARCHIVE' != $tbl_storage_engine): ?>
|
||||
<?= PMA\libraries\Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_primary',
|
||||
__('Primary'), 'b_primary.png', 'primary'
|
||||
) ?>
|
||||
<?= PMA\libraries\Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_unique',
|
||||
__('Unique'), 'b_unique.png', 'unique'
|
||||
) ?>
|
||||
<?= PMA\libraries\Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_index',
|
||||
__('Index'), 'b_index.png', 'index'
|
||||
) ?>
|
||||
|
||||
<?php if (! empty($tbl_storage_engine)
|
||||
&& ($tbl_storage_engine == 'MYISAM'
|
||||
|| $tbl_storage_engine == 'ARIA'
|
||||
|| $tbl_storage_engine == 'MARIA')): ?>
|
||||
<?= PMA\libraries\Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_fulltext',
|
||||
__('Fulltext'), 'b_ftext.png', 'ftext'
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfgRelation']['centralcolumnswork']): ?>
|
||||
<?= PMA\libraries\Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_central_columns_add',
|
||||
__('Add to central columns'), 'centralColumns_add.png',
|
||||
'add_to_central_columns'
|
||||
) ?>
|
||||
<?= PMA\libraries\Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_central_columns_remove',
|
||||
__('Remove from central columns'), 'centralColumns_delete.png',
|
||||
'remove_from_central_columns'
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
142
#pma/templates/table/structure/display_partitions.phtml
Normal file
142
#pma/templates/table/structure/display_partitions.phtml
Normal file
@ -0,0 +1,142 @@
|
||||
<?php use PMA\libraries\Message;
|
||||
use PMA\libraries\Util; ?>
|
||||
<div id="partitions">
|
||||
<fieldset>
|
||||
<legend><?= __('Partitions')
|
||||
, Util::showMySQLDocu('partitioning'); ?>
|
||||
</legend>
|
||||
<?php if (empty($partitions)): ?>
|
||||
<?= Message::notice(__('No partitioning defined!'))->getDisplay(); ?>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
<?= __('Partitioned by:');?>
|
||||
<code><?= htmlspecialchars($partitionMethod) , '(' , htmlspecialchars($partitionExpression) , ' )'; ?></code>
|
||||
</p>
|
||||
<?php if ($hasSubPartitions): ?>
|
||||
<p>
|
||||
<?= __('Sub partitioned by:'); ?>
|
||||
<code><?= htmlspecialchars($subPartitionMethod) , '(' , htmlspecialchars($subPartitionExpression) , ' )'; ?></code>
|
||||
<p>
|
||||
<?php endif; ?>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">#</th>
|
||||
<th><?= __('Partition'); ?></th>
|
||||
<?php if ($hasDescription): ?>
|
||||
<th><?= __('Expression'); ?></th>
|
||||
<?php endif; ?>
|
||||
<th><?= __('Rows'); ?></th>
|
||||
<th><?= __('Data length'); ?></th>
|
||||
<th><?= __('Index length'); ?></th>
|
||||
<th><?= __('Comment'); ?></th>
|
||||
<th colspan="<?= $rangeOrList ? '7' : '6'; ?>">
|
||||
<?= __('Action'); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $odd = true; ?>
|
||||
<?php foreach ($partitions as $partition): ?>
|
||||
<tr class="noclick <?= ($odd ? 'odd' : 'even') , ($hasSubPartitions ? ' marked' : '') ?>">
|
||||
<?php if ($hasSubPartitions): ?>
|
||||
<td><?= $partition->getOrdinal(); ?></td>
|
||||
<td></td>
|
||||
<?php else: ?>
|
||||
<td colspan="2"><?= $partition->getOrdinal(); ?></td>
|
||||
<?php endif; ?>
|
||||
<th><?= htmlspecialchars($partition->getName()); ?></th>
|
||||
<?php if ($hasDescription): ?>
|
||||
<td>
|
||||
<code>
|
||||
<?= htmlspecialchars($partition->getExpression())
|
||||
, ($partition->getMethod() == 'LIST' ? ' IN (' : ' < ')
|
||||
, htmlspecialchars($partition->getDescription())
|
||||
, ($partition->getMethod() == 'LIST' ? ')' : '');
|
||||
?>
|
||||
</code>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="value"><?= $partition->getRows(); ?></td>
|
||||
<td class="value"><?php
|
||||
list($value, $unit) = Util::formatByteDown(
|
||||
$partition->getDataLength(), 3, 1
|
||||
);
|
||||
?>
|
||||
<span><?= $value; ?></span>
|
||||
<span class="unit"><?= $unit; ?></span>
|
||||
</td>
|
||||
<td class="value"><?php
|
||||
list($value, $unit) = Util::formatByteDown(
|
||||
$partition->getIndexLength(), 3, 1
|
||||
);
|
||||
?>
|
||||
<span><?= $value; ?></span>
|
||||
<span class="unit"><?= $unit; ?></span>
|
||||
</td>
|
||||
<td><?= htmlspecialchars($partition->getComment()); ?></td>
|
||||
<?php foreach ($actionIcons as $action => $icon): ?>
|
||||
<td>
|
||||
<a href="tbl_structure.php<?= $url_query; ?>&partition_maintenance=1&sql_query=<?= urlencode(
|
||||
"ALTER TABLE " . Util::backquote($table) . $action . " PARTITION " . $partition->getName()
|
||||
) ?>"
|
||||
id="partition_action_<?= $action; ?>"
|
||||
name="partition_action_<?= $action; ?>"
|
||||
class="ajax"
|
||||
>
|
||||
<?= $icon; ?>
|
||||
</a>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ($hasSubPartitions): ?>
|
||||
<?php foreach ($partition->getSubPartitions() as $subParition): ?>
|
||||
<tr class="noclick <?= $odd ? 'odd' : 'even' ?>">
|
||||
<td></td>
|
||||
<td><?= $subParition->getOrdinal(); ?></td>
|
||||
<td><?= htmlspecialchars($subParition->getName()); ?></td>
|
||||
<?php if ($hasDescription): ?>
|
||||
<td></td>
|
||||
<?php endif; ?>
|
||||
<td class="value"><?= $subParition->getRows(); ?></td>
|
||||
<td class="value"><?php
|
||||
list($value, $unit) = Util::formatByteDown(
|
||||
$subParition->getDataLength(), 3, 1
|
||||
);
|
||||
?>
|
||||
<span><?= $value; ?></span>
|
||||
<span class="unit"><?= $unit; ?></span>
|
||||
</td>
|
||||
<td class="value"><?php
|
||||
list($value, $unit) = Util::formatByteDown(
|
||||
$subParition->getIndexLength(), 3, 1
|
||||
);
|
||||
?>
|
||||
<span><?= $value; ?></span>
|
||||
<span class="unit"><?= $unit; ?></span>
|
||||
</td>
|
||||
<td><?= htmlspecialchars($subParition->getComment()); ?></td>
|
||||
<td colspan="<?= $rangeOrList ? '7' : '6'; ?>"></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php $odd = ! $odd; ?>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
<fieldset class="tblFooters print_ignore">
|
||||
<form action="tbl_structure.php" method="post">
|
||||
<?= PMA_URL_getHiddenInputs($db, $table); ?>
|
||||
<input type="hidden" name="edit_partitioning" value="true" />
|
||||
<?php if (empty($partitions)): ?>
|
||||
<input type="submit" name="edit_partitioning" value="<?= __('Partition table'); ?>" />
|
||||
<?php else: ?>
|
||||
<?= Util::linkOrButton($removeUrl, __('Remove partitioning'), ['class' => 'button ajax', 'id' => 'remove_partitioning'])?>
|
||||
<input type="submit" name="edit_partitioning" value="<?= __('Edit partitioning'); ?>" />
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</fieldset>
|
||||
</div>
|
227
#pma/templates/table/structure/display_structure.phtml
Normal file
227
#pma/templates/table/structure/display_structure.phtml
Normal file
@ -0,0 +1,227 @@
|
||||
<?php
|
||||
use PMA\libraries\Partition;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
|
||||
$rownum = 0; $odd_row = true; ?>
|
||||
<form method="post" action="tbl_structure.php" name="fieldsForm" id="fieldsForm" class="ajax<?= $HideStructureActions; ?>">
|
||||
<?= PMA_URL_getHiddenInputs($db, $table); ?>
|
||||
<input type="hidden" name="table_type" value=
|
||||
<?php if ($db_is_system_schema): ?>
|
||||
"information_schema" />
|
||||
<?php elseif ($tbl_is_view): ?>
|
||||
"view" />
|
||||
<?php else: ?>
|
||||
"table" />
|
||||
<?php endif; ?>
|
||||
<table id="tablestructure" class="data topmargin">
|
||||
<!-- table header -->
|
||||
<?= PMA\libraries\Template::get('table/structure/table_structure_header')->render(
|
||||
array(
|
||||
'db_is_system_schema' => $db_is_system_schema,
|
||||
'tbl_is_view' => $tbl_is_view
|
||||
)
|
||||
); ?>
|
||||
<tbody>
|
||||
<!-- table body -->
|
||||
<?php foreach($fields as $row): ?>
|
||||
<?php
|
||||
$rownum++;
|
||||
$columns_list[] = $row['Field'];
|
||||
$field_charset = $row['Collation'];
|
||||
|
||||
$extracted_columnspec = Util::extractColumnSpec($row['Type']);
|
||||
$attribute = $extracted_columnspec['attribute'];
|
||||
if (strpos($row['Extra'], 'on update CURRENT_TIMESTAMP') !== false) {
|
||||
$attribute = 'on update CURRENT_TIMESTAMP';
|
||||
}
|
||||
|
||||
if (! isset($row['Default'])) {
|
||||
if ($row['Null'] == 'YES') {
|
||||
$row['Default'] = '<i>NULL</i>';
|
||||
}
|
||||
} else {
|
||||
$row['Default'] = htmlspecialchars($row['Default']);
|
||||
}
|
||||
|
||||
$field_name = htmlspecialchars($row['Field']);
|
||||
$displayed_field_name = $field_name;
|
||||
$comments = ''; //For column comments
|
||||
// underline commented fields and display a hover-title (CSS only)
|
||||
|
||||
if (isset($comments_map[$row['Field']])) {
|
||||
$displayed_field_name = '<span class="commented_column" title="'
|
||||
. htmlspecialchars($comments_map[$row['Field']]) . '">'
|
||||
. $field_name . '</span>';
|
||||
$comments = htmlspecialchars($comments_map[$row['Field']]);
|
||||
}
|
||||
|
||||
if ($primary && $primary->hasColumn($field_name)) {
|
||||
$displayed_field_name .= Util::getImage(
|
||||
'b_primary.png', __('Primary')
|
||||
);
|
||||
}
|
||||
if (in_array($field_name, $columns_with_index)) {
|
||||
$displayed_field_name .= Util::getImage(
|
||||
'bd_primary.png', __('Index')
|
||||
);
|
||||
}
|
||||
?>
|
||||
<tr class="<?= ($odd_row ? 'odd': 'even'); ?>">
|
||||
<?php $odd_row = !$odd_row; ?>
|
||||
<?= PMA\libraries\Template::get('table/structure/table_structure_row')->render(
|
||||
array(
|
||||
'row' => $row,
|
||||
'rownum' => $rownum,
|
||||
'displayed_field_name' => $displayed_field_name,
|
||||
'type_nowrap' => Util::getClassForType($extracted_columnspec['type']),
|
||||
'extracted_columnspec' => $extracted_columnspec,
|
||||
'attribute' => $attribute,
|
||||
'tbl_is_view' => $tbl_is_view,
|
||||
'db_is_system_schema' => $db_is_system_schema,
|
||||
'url_query' => $url_query,
|
||||
'field_encoded' => urlencode($row['Field']),
|
||||
'titles' => $titles,
|
||||
'table' => $table,
|
||||
'tbl_storage_engine' => $tbl_storage_engine,
|
||||
'field_charset' => $field_charset,
|
||||
'comments' => $comments
|
||||
)
|
||||
); ?>
|
||||
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
|
||||
<?= Template::get('table/structure/actions_in_table_structure')->render(
|
||||
array(
|
||||
'extracted_columnspec' => $extracted_columnspec,
|
||||
'type' => (!empty($extracted_columnspec['print_type'])) ? $extracted_columnspec['print_type'] : ' ',
|
||||
'tbl_storage_engine' => $tbl_storage_engine,
|
||||
'primary' => $primary,
|
||||
'field_name' => $field_name,
|
||||
'url_query' => $url_query,
|
||||
'titles' => $titles,
|
||||
'row' => $row,
|
||||
'rownum' => $rownum,
|
||||
'columns_with_unique_index' => $columns_with_unique_index,
|
||||
'isInCentralColumns' => in_array($row['Field'], $central_list) ? true : false
|
||||
)
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?= Template::get('table/structure/check_all_table_column')->render(
|
||||
array(
|
||||
'pmaThemeImage' => $GLOBALS['pmaThemeImage'],
|
||||
'text_dir' => $GLOBALS['text_dir'],
|
||||
'tbl_is_view' => $tbl_is_view,
|
||||
'db_is_system_schema' => $db_is_system_schema,
|
||||
'tbl_storage_engine' => $tbl_storage_engine
|
||||
)
|
||||
); ?>
|
||||
</form>
|
||||
<hr class="print_ignore"/>
|
||||
<?= Template::get('table/structure/move_columns_dialog')->render(); ?>
|
||||
<!--Work on the table-->
|
||||
<div id="structure-action-links">
|
||||
<?php if ($tbl_is_view && ! $db_is_system_schema): ?>
|
||||
<?= Util::linkOrButton(
|
||||
$edit_view_url,
|
||||
Util::getIcon('b_edit.png', __('Edit view'), true)
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
<?= Template::get('table/structure/optional_action_links')->render(
|
||||
array(
|
||||
'url_query' => $url_query,
|
||||
'tbl_is_view' => $tbl_is_view,
|
||||
'db_is_system_schema' => $db_is_system_schema
|
||||
)
|
||||
); ?>
|
||||
</div>
|
||||
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
|
||||
<br />
|
||||
<?= Template::get('table/structure/add_column')->render(
|
||||
array('columns_list' => $columns_list)
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--Displays indexes-->
|
||||
<?php if (! $tbl_is_view
|
||||
&& ! $db_is_system_schema && 'ARCHIVE' != $tbl_storage_engine): ?>
|
||||
<?= PMA_getHtmlForDisplayIndexes(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--Display partition details-->
|
||||
<?php if (Partition::havePartitioning()):
|
||||
$partition_names = Partition::getPartitionNames($db, $table);
|
||||
|
||||
// detect partitioning
|
||||
if (! empty($partition_names) && ! is_null($partition_names[0])):
|
||||
|
||||
$partitions = Partition::getPartitions($db, $table);
|
||||
$firstPartition = $partitions[0];
|
||||
$rangeOrList = $firstPartition->getMethod() == 'RANGE'
|
||||
|| $firstPartition->getMethod() == 'RANGE COLUMNS'
|
||||
|| $firstPartition->getMethod() == 'LIST'
|
||||
|| $firstPartition->getMethod() == 'LIST COLUMNS';
|
||||
$subParitions = $firstPartition->getSubPartitions();
|
||||
$hasSubPartitions = $firstPartition->hasSubPartitions();
|
||||
if ($hasSubPartitions) {
|
||||
$firstSubPartition = $subParitions[0];
|
||||
}
|
||||
|
||||
$actionIcons = array(
|
||||
'ANALYZE' => Util::getIcon('b_search.png', __('Analyze')),
|
||||
'CHECK' => Util::getIcon('eye.png', __('Check')),
|
||||
'OPTIMIZE' => Util::getIcon('normalize.png', __('Optimize')),
|
||||
'REBUILD' => Util::getIcon('s_tbl.png', __('Rebuild')),
|
||||
'REPAIR' => Util::getIcon('b_tblops.png', __('Repair')),
|
||||
'TRUNCATE' => Util::getIcon('b_empty.png', __('Truncate')),
|
||||
);
|
||||
if ($rangeOrList) {
|
||||
$actionIcons['DROP'] = Util::getIcon('b_drop.png', __('Drop'));
|
||||
}
|
||||
|
||||
echo Util::getDivForSliderEffect(
|
||||
'partitions', __('Partitions')
|
||||
);
|
||||
|
||||
$tmp_partition_description = $firstPartition->getDescription();
|
||||
|
||||
$removeSQL = "ALTER TABLE " . Util::backquote($table) . " REMOVE PARTITIONING";
|
||||
$removeUrl = 'sql.php' . $url_query . '&sql_query=' . urlencode($removeSQL);
|
||||
|
||||
echo Template::get('table/structure/display_partitions')->render(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'url_query' => $url_query,
|
||||
'partitions' => $partitions,
|
||||
'partitionMethod' => $firstPartition->getMethod(),
|
||||
'partitionExpression' => $firstPartition->getExpression(),
|
||||
'hasDescription' => ! empty($tmp_partition_description),
|
||||
'hasSubPartitions' => $hasSubPartitions,
|
||||
'subPartitionMethod' => $hasSubPartitions ? $firstSubPartition->getMethod() : null,
|
||||
'subPartitionExpression' => $hasSubPartitions ? $firstSubPartition->getExpression() : null,
|
||||
'actionIcons' => $actionIcons,
|
||||
'rangeOrList' => $rangeOrList,
|
||||
'removeUrl' => $removeUrl,
|
||||
)
|
||||
);
|
||||
else:
|
||||
echo Template::get('table/structure/display_partitions')->render(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
)
|
||||
);
|
||||
endif;
|
||||
?>
|
||||
<!-- For closing Slider effect div-->
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--Displays Space usage and row statistics-->
|
||||
<?php if ($GLOBALS['cfg']['ShowStats']): ?>
|
||||
<?= $tablestats; ?>
|
||||
<?php endif; ?>
|
||||
<div class="clearfloat"></div>
|
79
#pma/templates/table/structure/display_table_stats.phtml
Normal file
79
#pma/templates/table/structure/display_table_stats.phtml
Normal file
@ -0,0 +1,79 @@
|
||||
<div id="tablestatistics">
|
||||
<?php $odd_row = false; ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Information'); ?></legend>
|
||||
<p> <strong> <?= __('Table comments:') ?> </strong>
|
||||
<?= isset($showtable['TABLE_COMMENT']) ? htmlspecialchars($showtable['TABLE_COMMENT']) : '';?>
|
||||
</p>
|
||||
<a id="showusage"></a>
|
||||
|
||||
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
|
||||
<table id="tablespaceusage" class="data">
|
||||
<caption class="tblHeaders"><?= __('Space usage'); ?></caption>
|
||||
<tbody>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Data'); ?></th>
|
||||
<td class="value"><?= $data_size; ?></td>
|
||||
<td class="unit"><?= $data_unit; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php if (isset($index_size)): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Index'); ?></th>
|
||||
<td class="value"><?= $index_size; ?></td>
|
||||
<td class="unit"><?= $index_unit; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($free_size)): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Overhead'); ?></th>
|
||||
<td class="value"><?= $free_size; ?></td>
|
||||
<td class="unit"><?= $free_unit; ?></td>
|
||||
</tr>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Effective'); ?></th>
|
||||
<td class="value"><?= $effect_size; ?></td>
|
||||
<td class="unit"><?= $effect_unit; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($tot_size) && $mergetable == false): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Total'); ?></th>
|
||||
<td class="value"><?= $tot_size; ?></td>
|
||||
<td class="unit"><?= $tot_unit; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Optimize link if overhead -->
|
||||
<?php if (isset($free_size)
|
||||
&& ($tbl_storage_engine == 'MYISAM'
|
||||
|| $tbl_storage_engine == 'ARIA'
|
||||
|| $tbl_storage_engine == 'MARIA'
|
||||
|| $tbl_storage_engine == 'BDB')): ?>
|
||||
<tr class="tblFooters">
|
||||
<td colspan="3" class="center">
|
||||
<a href="sql.php<?= $url_query; ?>&pos=0&sql_query=<?= urlencode(
|
||||
'OPTIMIZE TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table'])); ?>">
|
||||
<?= PMA\libraries\Util::getIcon('b_tbloptimize.png', __('Optimize table')); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<?= PMA\libraries\Template::get('table/structure/row_stats_table')->render(
|
||||
array(
|
||||
'showtable' => $showtable,
|
||||
'tbl_collation' => $tbl_collation,
|
||||
'is_innodb' => $is_innodb,
|
||||
'mergetable' => $mergetable,
|
||||
'avg_size' => (isset ($avg_size) ? $avg_size : ''),
|
||||
'avg_unit' => (isset ($avg_unit) ? $avg_unit : '')
|
||||
)
|
||||
)
|
||||
?>
|
||||
</fieldset>
|
||||
</div>
|
8
#pma/templates/table/structure/move_columns_dialog.phtml
Normal file
8
#pma/templates/table/structure/move_columns_dialog.phtml
Normal file
@ -0,0 +1,8 @@
|
||||
<div id="move_columns_dialog" title="<?= __('Move columns'); ?>" style="display: none">
|
||||
<p><?= __('Move the columns by dragging them up and down.'); ?></p>
|
||||
<form action="tbl_structure.php">
|
||||
<div><?= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']); ?>
|
||||
<ul></ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
37
#pma/templates/table/structure/optional_action_links.phtml
Normal file
37
#pma/templates/table/structure/optional_action_links.phtml
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
use PMA\libraries\Tracker;
|
||||
use PMA\libraries\Util;
|
||||
|
||||
?>
|
||||
<a href="#" id="printView"><?= Util::getIcon('b_print.png', __('Print'), true); ?></a>
|
||||
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
|
||||
<a href="sql.php<?= $url_query; ?>&session_max_rows=all&sql_query=<?= urlencode(
|
||||
'SELECT * FROM ' . Util::backquote($GLOBALS['table'])
|
||||
. ' PROCEDURE ANALYSE()'
|
||||
); ?>" style="margin-right: 0;">
|
||||
<?= Util::getIcon(
|
||||
'b_tblanalyse.png',
|
||||
__('Propose table structure'),
|
||||
true
|
||||
); ?>
|
||||
</a>
|
||||
<?= Util::showMySQLDocu('procedure_analyse'); ?>
|
||||
<?php if (Tracker::isActive()): ?>
|
||||
<a href="tbl_tracking.php<?= $url_query; ?>">
|
||||
<?= Util::getIcon('eye.png', __('Track table'), true); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<a href="#" id="move_columns_anchor">
|
||||
<?= Util::getIcon('b_move.png', __('Move columns'), true); ?>
|
||||
</a>
|
||||
<a href="normalization.php<?= $url_query; ?>">
|
||||
<?= Util::getIcon('normalize.png', __('Improve table structure'), true); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($tbl_is_view && ! $db_is_system_schema): ?>
|
||||
<?php if (Tracker::isActive()): ?>
|
||||
<a href="tbl_tracking.php<?= $url_query; ?>">
|
||||
<?= Util::getIcon('eye.png', __('Track view'), true); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
@ -0,0 +1,13 @@
|
||||
<form action="tbl_structure.php" method="post">
|
||||
|
||||
<?= PMA_URL_getHiddenInputs($db, $table); ?>
|
||||
<input type="hidden" name="edit_partitioning" value="true" />
|
||||
|
||||
<fieldset>
|
||||
<legend><?= __('Edit partitioning'); ?></legend>
|
||||
<?php include 'libraries/tbl_partition_definition.inc.php'; ?>
|
||||
</fieldset>
|
||||
<fieldset class="tblFooters">
|
||||
<input type="submit" name="save_partitioning" value="<?= __('Save'); ?>">
|
||||
</fieldset>
|
||||
</form>
|
99
#pma/templates/table/structure/row_stats_table.phtml
Normal file
99
#pma/templates/table/structure/row_stats_table.phtml
Normal file
@ -0,0 +1,99 @@
|
||||
<?php $odd_row = false; ?>
|
||||
<table id="tablerowstats" class="data">
|
||||
<caption class="tblHeaders"><?= __('Row statistics'); ?></caption>
|
||||
<tbody>
|
||||
<?php if (isset($showtable['Row_format'])): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Format'); ?></th>
|
||||
<?php if ($showtable['Row_format'] == 'Fixed'): ?>
|
||||
<td class="value"><?= __('static'); ?></td>
|
||||
<?php elseif ($showtable['Row_format'] == 'Dynamic'): ?>
|
||||
<td class="value"><?= __('dynamic'); ?></td>
|
||||
<?php else: ?>
|
||||
<td class="value"><?= $showtable['Row_format']; ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (! empty($showtable['Create_options'])): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Options'); ?></th>
|
||||
<?php if ($showtable['Create_options'] == 'partitioned'): ?>
|
||||
<td class="value"><?= __('partitioned'); ?></td>
|
||||
<?php else: ?>
|
||||
<td class="value"><?= $showtable['Create_options']; ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($tbl_collation)): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Collation'); ?></th>
|
||||
<td class="value">
|
||||
<dfn title="<?= PMA_getCollationDescr($tbl_collation); ?>">
|
||||
<?= $tbl_collation; ?>
|
||||
</dfn>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$is_innodb && isset($showtable['Rows'])): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Rows'); ?></th>
|
||||
<td class="value"><?= PMA\libraries\Util::formatNumber($showtable['Rows'], 0); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$is_innodb
|
||||
&& isset($showtable['Avg_row_length'])
|
||||
&& $showtable['Avg_row_length'] > 0
|
||||
): ?>
|
||||
<?php list($avg_row_length_value, $avg_row_length_unit)
|
||||
= PMA\libraries\Util::formatByteDown($showtable['Avg_row_length'], 6, 1); ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Row length'); ?></th>
|
||||
<td class="value"><?= $avg_row_length_value , ' ' , $avg_row_length_unit; ?></td>
|
||||
</tr>
|
||||
<?php unset($avg_row_length_value, $avg_row_length_unit); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$is_innodb
|
||||
&& isset($showtable['Data_length'])
|
||||
&& isset($showtable['Rows'])
|
||||
&& $showtable['Rows'] > 0
|
||||
&& $mergetable == false): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Row size'); ?></th>
|
||||
<td class="value"><?= $avg_size , ' ' , $avg_unit; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($showtable['Auto_increment'])): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Next autoindex'); ?></th>
|
||||
<td class="value"><?= PMA\libraries\Util::formatNumber($showtable['Auto_increment'], 0); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($showtable['Create_time'])): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Creation'); ?></th>
|
||||
<td class="value"><?= PMA\libraries\Util::localisedDate(strtotime($showtable['Create_time'])); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($showtable['Update_time'])): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Last update'); ?></th>
|
||||
<td class="value"><?= PMA\libraries\Util::localisedDate(strtotime($showtable['Update_time'])); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($showtable['Check_time'])): ?>
|
||||
<tr class="<?= (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?= __('Last check'); ?></th>
|
||||
<td class="value"><?= PMA\libraries\Util::localisedDate(strtotime($showtable['Check_time'])); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
28
#pma/templates/table/structure/table_structure_header.phtml
Normal file
28
#pma/templates/table/structure/table_structure_header.phtml
Normal file
@ -0,0 +1,28 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="print_ignore"></th>
|
||||
<th>#</th>
|
||||
<th><?php use PMA\libraries\Util; ?>
|
||||
|
||||
<?= __('Name'); ?></th>
|
||||
<th><?= __('Type'); ?></th>
|
||||
<th><?= __('Collation'); ?></th>
|
||||
<th><?= __('Attributes'); ?></th>
|
||||
<th><?= __('Null'); ?></th>
|
||||
<th><?= __('Default'); ?></th>
|
||||
<?php if ($GLOBALS['cfg']['ShowColumnComments']): ?>
|
||||
<th><?= __('Comments'); ?></th>
|
||||
<?php endif; ?>
|
||||
<th><?= __('Extra'); ?></th>
|
||||
<!-- see tbl_structure.js, function moreOptsMenuResize() -->
|
||||
<?php if (! $db_is_system_schema && ! $tbl_is_view): ?>
|
||||
<?php
|
||||
$colspan = 9;
|
||||
if (Util::showIcons('ActionLinksMode')) {
|
||||
$colspan--;
|
||||
}
|
||||
?>
|
||||
<th colspan="<?= $colspan; ?>" class="action print_ignore"><?= __('Action'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
55
#pma/templates/table/structure/table_structure_row.phtml
Normal file
55
#pma/templates/table/structure/table_structure_row.phtml
Normal file
@ -0,0 +1,55 @@
|
||||
<td class="center print_ignore">
|
||||
<input type="checkbox" class="checkall" name="selected_fld[]" value="<?= htmlspecialchars($row['Field']); ?>" id="checkbox_row_<?= $rownum; ?>"/>
|
||||
</td>
|
||||
<td class="right"><?= $rownum; ?></td>
|
||||
<th class="nowrap">
|
||||
<label for="checkbox_row_<?= $rownum; ?>">
|
||||
<?= preg_replace('/[\x00-\x1F]/', '⁑', $displayed_field_name); ?>
|
||||
</label>
|
||||
</th>
|
||||
<td <?= $type_nowrap; ?>>
|
||||
<bdo dir="ltr" lang="en"><?= $extracted_columnspec['displayed_type']; ?>
|
||||
<?php if ($GLOBALS['cfgRelation']['commwork'] && $GLOBALS['cfgRelation']['mimework']
|
||||
&& $GLOBALS['cfg']['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])): ?>
|
||||
<br />MIME: <?= strtolower(str_replace('_', '/', $mime_map[$row['Field']]['mimetype'])); ?>
|
||||
<?php endif; ?>
|
||||
</bdo>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (! empty($field_charset)): ?>
|
||||
<dfn title="<?= PMA_getCollationDescr($field_charset); ?>"><?= $field_charset; ?></dfn>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="column_attribute nowrap"><?= $attribute; ?></td>
|
||||
<td><?= (($row['Null'] == 'YES') ? __('Yes') : __('No')); ?></td>
|
||||
<td class="nowrap">
|
||||
<?php if (isset($row['Default'])): ?>
|
||||
<?php if ($extracted_columnspec['type'] == 'bit'): ?>
|
||||
<?= PMA\libraries\Util::convertBitDefaultValue($row['Default']); ?>
|
||||
<?php else: ?>
|
||||
<?= $row['Default']; ?>
|
||||
<?php endif;?>
|
||||
<?php else: ?>
|
||||
<i><?= _pgettext('None for default', 'None'); ?></i>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php if ($GLOBALS['cfg']['ShowColumnComments']): ?>
|
||||
<td>
|
||||
<?= $comments; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="nowrap"><?= mb_strtoupper($row['Extra']); ?></td>
|
||||
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
|
||||
<td class="edit center print_ignore">
|
||||
<a class="change_column_anchor ajax" href="tbl_structure.php<?= $url_query; ?>&field=<?= $field_encoded; ?>&change_column=1">
|
||||
<?= $titles['Change']; ?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="drop center print_ignore">
|
||||
<a class="drop_column_anchor ajax" href="sql.php<?= $url_query; ?>&sql_query=<?= urlencode(
|
||||
'ALTER TABLE ' . PMA\libraries\Util::backquote($table)
|
||||
. ' DROP ' . PMA\libraries\Util::backquote($row['Field']) . ';'); ?>&dropped_column=<?= $field_encoded; ?>&purge=1&message_to_show=<?= urlencode(sprintf(__('Column %s has been dropped.'), htmlspecialchars($row['Field']))) ?>" >
|
||||
<?= $titles['Drop']; ?>
|
||||
</a>
|
||||
</td>
|
||||
<?php endif; ?>
|
Reference in New Issue
Block a user