Differential D10601 Diff 25473 src/applications/config/controller/PhabricatorConfigDatabaseStatusController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/controller/PhabricatorConfigDatabaseStatusController.php
Show First 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | private function renderTable( | ||||
$table_name) { | $table_name) { | ||||
$type_issue = PhabricatorConfigStorageSchema::ISSUE_COLUMNTYPE; | $type_issue = PhabricatorConfigStorageSchema::ISSUE_COLUMNTYPE; | ||||
$charset_issue = PhabricatorConfigStorageSchema::ISSUE_CHARSET; | $charset_issue = PhabricatorConfigStorageSchema::ISSUE_CHARSET; | ||||
$collation_issue = PhabricatorConfigStorageSchema::ISSUE_COLLATION; | $collation_issue = PhabricatorConfigStorageSchema::ISSUE_COLLATION; | ||||
$nullable_issue = PhabricatorConfigStorageSchema::ISSUE_NULLABLE; | $nullable_issue = PhabricatorConfigStorageSchema::ISSUE_NULLABLE; | ||||
$unique_issue = PhabricatorConfigStorageSchema::ISSUE_UNIQUE; | $unique_issue = PhabricatorConfigStorageSchema::ISSUE_UNIQUE; | ||||
$columns_issue = PhabricatorConfigStorageSchema::ISSUE_KEYCOLUMNS; | $columns_issue = PhabricatorConfigStorageSchema::ISSUE_KEYCOLUMNS; | ||||
$longkey_issue = PhabricatorConfigStorageSchema::ISSUE_LONGKEY; | |||||
$database = $comp->getDatabase($database_name); | $database = $comp->getDatabase($database_name); | ||||
if (!$database) { | if (!$database) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$table = $database->getTable($table_name); | $table = $database->getTable($table_name); | ||||
if (!$table) { | if (!$table) { | ||||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | foreach ($table->getKeys() as $key_name => $key) { | ||||
} | } | ||||
$size += $column->getKeyByteLength($prefix); | $size += $column->getKeyByteLength($prefix); | ||||
} | } | ||||
$size_formatted = null; | $size_formatted = null; | ||||
if ($size) { | if ($size) { | ||||
$size_formatted = $this->renderAttr( | $size_formatted = $this->renderAttr( | ||||
$size, | $size, | ||||
($size > self::MAX_INNODB_KEY_LENGTH)); | $key->hasIssue($longkey_issue)); | ||||
} | } | ||||
$key_rows[] = array( | $key_rows[] = array( | ||||
$this->renderIcon($status), | $this->renderIcon($status), | ||||
phutil_tag( | phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => $this->getApplicationURI( | 'href' => $this->getApplicationURI( | ||||
▲ Show 20 Lines • Show All 334 Lines • Show Last 20 Lines |