mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 05:20:56 +01:00
Remove the "note" database issue status
Summary: Ref T1191. This was useful for annotating everything but we no longer need it; there are just two types of issues now: - Error: stuff we can't fix (missing or surplus tables/database/columns, bad column nullability). - Warning: stuff we can fix (column types, character sets, collations, missing or surplus keys, incorrectly defined keys, bad key uniqueness). Test Plan: Saw 3,399 warnings and 0 errors. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10594
This commit is contained in:
parent
03519c53bb
commit
ab6c6836f4
4 changed files with 3 additions and 29 deletions
|
@ -28,9 +28,6 @@ abstract class PhabricatorConfigDatabaseController
|
|||
case PhabricatorConfigStorageSchema::STATUS_OKAY:
|
||||
$icon = 'fa-check-circle green';
|
||||
break;
|
||||
case PhabricatorConfigStorageSchema::STATUS_NOTE:
|
||||
$icon = 'fa-info-circle blue';
|
||||
break;
|
||||
case PhabricatorConfigStorageSchema::STATUS_WARN:
|
||||
$icon = 'fa-exclamation-circle yellow';
|
||||
break;
|
||||
|
|
|
@ -145,12 +145,6 @@ final class PhabricatorConfigDatabaseIssueController
|
|||
new PhutilNumber($counts[PhabricatorConfigStorageSchema::STATUS_WARN]));
|
||||
}
|
||||
|
||||
if (isset($counts[PhabricatorConfigStorageSchema::STATUS_NOTE])) {
|
||||
$errors[] = pht(
|
||||
'Detected %s minor issue(s) with the scheamata.',
|
||||
new PhutilNumber($counts[PhabricatorConfigStorageSchema::STATUS_NOTE]));
|
||||
}
|
||||
|
||||
$title = pht('Database Issues');
|
||||
|
||||
$table_box = id(new PHUIObjectBoxView())
|
||||
|
|
|
@ -710,10 +710,6 @@ final class PhabricatorConfigDatabaseStatusController
|
|||
|
||||
$status = PhabricatorConfigStorageSchema::getIssueStatus($issue);
|
||||
switch ($status) {
|
||||
case PhabricatorConfigStorageSchema::STATUS_NOTE:
|
||||
$icon = PHUIStatusItemView::ICON_INFO;
|
||||
$color = 'blue';
|
||||
break;
|
||||
case PhabricatorConfigStorageSchema::STATUS_WARN:
|
||||
$icon = PHUIStatusItemView::ICON_WARNING;
|
||||
$color = 'yellow';
|
||||
|
|
|
@ -12,12 +12,10 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
|
|||
const ISSUE_NULLABLE = 'nullable';
|
||||
const ISSUE_KEYCOLUMNS = 'keycolumns';
|
||||
const ISSUE_UNIQUE = 'unique';
|
||||
const ISSUE_SUBNOTE = 'subnote';
|
||||
const ISSUE_SUBWARN = 'subwarn';
|
||||
const ISSUE_SUBFAIL = 'subfail';
|
||||
|
||||
const STATUS_OKAY = 'okay';
|
||||
const STATUS_NOTE = 'note';
|
||||
const STATUS_WARN = 'warn';
|
||||
const STATUS_FAIL = 'fail';
|
||||
|
||||
|
@ -60,9 +58,6 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
|
|||
|
||||
foreach ($this->getSubschemata() as $sub) {
|
||||
switch ($sub->getStatus()) {
|
||||
case self::STATUS_NOTE:
|
||||
$issues[self::ISSUE_SUBNOTE] = self::ISSUE_SUBNOTE;
|
||||
break;
|
||||
case self::STATUS_WARN:
|
||||
$issues[self::ISSUE_SUBWARN] = self::ISSUE_SUBWARN;
|
||||
break;
|
||||
|
@ -122,8 +117,6 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
|
|||
return pht('Key on Wrong Columns');
|
||||
case self::ISSUE_UNIQUE:
|
||||
return pht('Key has Wrong Uniqueness');
|
||||
case self::ISSUE_SUBNOTE:
|
||||
return pht('Subschemata Have Notices');
|
||||
case self::ISSUE_SUBWARN:
|
||||
return pht('Subschemata Have Warnings');
|
||||
case self::ISSUE_SUBFAIL:
|
||||
|
@ -155,8 +148,6 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
|
|||
return pht('This schema is on the wrong columns.');
|
||||
case self::ISSUE_UNIQUE:
|
||||
return pht('This key has the wrong uniqueness setting.');
|
||||
case self::ISSUE_SUBNOTE:
|
||||
return pht('Subschemata have setup notices.');
|
||||
case self::ISSUE_SUBWARN:
|
||||
return pht('Subschemata have setup warnings.');
|
||||
case self::ISSUE_SUBFAIL:
|
||||
|
@ -170,20 +161,18 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
|
|||
switch ($issue) {
|
||||
case self::ISSUE_MISSING:
|
||||
case self::ISSUE_SURPLUS:
|
||||
case self::ISSUE_SUBFAIL:
|
||||
case self::ISSUE_NULLABLE:
|
||||
case self::ISSUE_SUBFAIL:
|
||||
return self::STATUS_FAIL;
|
||||
case self::ISSUE_SUBWARN:
|
||||
case self::ISSUE_COLUMNTYPE:
|
||||
return self::STATUS_WARN;
|
||||
case self::ISSUE_SUBNOTE:
|
||||
case self::ISSUE_CHARSET:
|
||||
case self::ISSUE_COLLATION:
|
||||
case self::ISSUE_MISSINGKEY:
|
||||
case self::ISSUE_SURPLUSKEY:
|
||||
case self::ISSUE_UNIQUE:
|
||||
case self::ISSUE_KEYCOLUMNS:
|
||||
return self::STATUS_NOTE;
|
||||
return self::STATUS_WARN;
|
||||
default:
|
||||
throw new Exception(pht('Unknown schema issue "%s"!', $issue));
|
||||
}
|
||||
|
@ -192,10 +181,8 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
|
|||
public static function getStatusSeverity($status) {
|
||||
switch ($status) {
|
||||
case self::STATUS_FAIL:
|
||||
return 3;
|
||||
case self::STATUS_WARN:
|
||||
return 2;
|
||||
case self::STATUS_NOTE:
|
||||
case self::STATUS_WARN:
|
||||
return 1;
|
||||
case self::STATUS_OKAY:
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue