1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +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:
epriestley 2014-10-01 08:00:11 -07:00
parent 03519c53bb
commit ab6c6836f4
4 changed files with 3 additions and 29 deletions

View file

@ -28,9 +28,6 @@ abstract class PhabricatorConfigDatabaseController
case PhabricatorConfigStorageSchema::STATUS_OKAY: case PhabricatorConfigStorageSchema::STATUS_OKAY:
$icon = 'fa-check-circle green'; $icon = 'fa-check-circle green';
break; break;
case PhabricatorConfigStorageSchema::STATUS_NOTE:
$icon = 'fa-info-circle blue';
break;
case PhabricatorConfigStorageSchema::STATUS_WARN: case PhabricatorConfigStorageSchema::STATUS_WARN:
$icon = 'fa-exclamation-circle yellow'; $icon = 'fa-exclamation-circle yellow';
break; break;

View file

@ -145,12 +145,6 @@ final class PhabricatorConfigDatabaseIssueController
new PhutilNumber($counts[PhabricatorConfigStorageSchema::STATUS_WARN])); 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'); $title = pht('Database Issues');
$table_box = id(new PHUIObjectBoxView()) $table_box = id(new PHUIObjectBoxView())

View file

@ -710,10 +710,6 @@ final class PhabricatorConfigDatabaseStatusController
$status = PhabricatorConfigStorageSchema::getIssueStatus($issue); $status = PhabricatorConfigStorageSchema::getIssueStatus($issue);
switch ($status) { switch ($status) {
case PhabricatorConfigStorageSchema::STATUS_NOTE:
$icon = PHUIStatusItemView::ICON_INFO;
$color = 'blue';
break;
case PhabricatorConfigStorageSchema::STATUS_WARN: case PhabricatorConfigStorageSchema::STATUS_WARN:
$icon = PHUIStatusItemView::ICON_WARNING; $icon = PHUIStatusItemView::ICON_WARNING;
$color = 'yellow'; $color = 'yellow';

View file

@ -12,12 +12,10 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
const ISSUE_NULLABLE = 'nullable'; const ISSUE_NULLABLE = 'nullable';
const ISSUE_KEYCOLUMNS = 'keycolumns'; const ISSUE_KEYCOLUMNS = 'keycolumns';
const ISSUE_UNIQUE = 'unique'; const ISSUE_UNIQUE = 'unique';
const ISSUE_SUBNOTE = 'subnote';
const ISSUE_SUBWARN = 'subwarn'; const ISSUE_SUBWARN = 'subwarn';
const ISSUE_SUBFAIL = 'subfail'; const ISSUE_SUBFAIL = 'subfail';
const STATUS_OKAY = 'okay'; const STATUS_OKAY = 'okay';
const STATUS_NOTE = 'note';
const STATUS_WARN = 'warn'; const STATUS_WARN = 'warn';
const STATUS_FAIL = 'fail'; const STATUS_FAIL = 'fail';
@ -60,9 +58,6 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
foreach ($this->getSubschemata() as $sub) { foreach ($this->getSubschemata() as $sub) {
switch ($sub->getStatus()) { switch ($sub->getStatus()) {
case self::STATUS_NOTE:
$issues[self::ISSUE_SUBNOTE] = self::ISSUE_SUBNOTE;
break;
case self::STATUS_WARN: case self::STATUS_WARN:
$issues[self::ISSUE_SUBWARN] = self::ISSUE_SUBWARN; $issues[self::ISSUE_SUBWARN] = self::ISSUE_SUBWARN;
break; break;
@ -122,8 +117,6 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
return pht('Key on Wrong Columns'); return pht('Key on Wrong Columns');
case self::ISSUE_UNIQUE: case self::ISSUE_UNIQUE:
return pht('Key has Wrong Uniqueness'); return pht('Key has Wrong Uniqueness');
case self::ISSUE_SUBNOTE:
return pht('Subschemata Have Notices');
case self::ISSUE_SUBWARN: case self::ISSUE_SUBWARN:
return pht('Subschemata Have Warnings'); return pht('Subschemata Have Warnings');
case self::ISSUE_SUBFAIL: case self::ISSUE_SUBFAIL:
@ -155,8 +148,6 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
return pht('This schema is on the wrong columns.'); return pht('This schema is on the wrong columns.');
case self::ISSUE_UNIQUE: case self::ISSUE_UNIQUE:
return pht('This key has the wrong uniqueness setting.'); return pht('This key has the wrong uniqueness setting.');
case self::ISSUE_SUBNOTE:
return pht('Subschemata have setup notices.');
case self::ISSUE_SUBWARN: case self::ISSUE_SUBWARN:
return pht('Subschemata have setup warnings.'); return pht('Subschemata have setup warnings.');
case self::ISSUE_SUBFAIL: case self::ISSUE_SUBFAIL:
@ -170,20 +161,18 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
switch ($issue) { switch ($issue) {
case self::ISSUE_MISSING: case self::ISSUE_MISSING:
case self::ISSUE_SURPLUS: case self::ISSUE_SURPLUS:
case self::ISSUE_SUBFAIL:
case self::ISSUE_NULLABLE: case self::ISSUE_NULLABLE:
case self::ISSUE_SUBFAIL:
return self::STATUS_FAIL; return self::STATUS_FAIL;
case self::ISSUE_SUBWARN: case self::ISSUE_SUBWARN:
case self::ISSUE_COLUMNTYPE: case self::ISSUE_COLUMNTYPE:
return self::STATUS_WARN;
case self::ISSUE_SUBNOTE:
case self::ISSUE_CHARSET: case self::ISSUE_CHARSET:
case self::ISSUE_COLLATION: case self::ISSUE_COLLATION:
case self::ISSUE_MISSINGKEY: case self::ISSUE_MISSINGKEY:
case self::ISSUE_SURPLUSKEY: case self::ISSUE_SURPLUSKEY:
case self::ISSUE_UNIQUE: case self::ISSUE_UNIQUE:
case self::ISSUE_KEYCOLUMNS: case self::ISSUE_KEYCOLUMNS:
return self::STATUS_NOTE; return self::STATUS_WARN;
default: default:
throw new Exception(pht('Unknown schema issue "%s"!', $issue)); throw new Exception(pht('Unknown schema issue "%s"!', $issue));
} }
@ -192,10 +181,8 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
public static function getStatusSeverity($status) { public static function getStatusSeverity($status) {
switch ($status) { switch ($status) {
case self::STATUS_FAIL: case self::STATUS_FAIL:
return 3;
case self::STATUS_WARN:
return 2; return 2;
case self::STATUS_NOTE: case self::STATUS_WARN:
return 1; return 1;
case self::STATUS_OKAY: case self::STATUS_OKAY:
return 0; return 0;