@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+3 -29
-3
src/applications/config/controller/PhabricatorConfigDatabaseController.php
··· 28 28 case PhabricatorConfigStorageSchema::STATUS_OKAY: 29 29 $icon = 'fa-check-circle green'; 30 30 break; 31 - case PhabricatorConfigStorageSchema::STATUS_NOTE: 32 - $icon = 'fa-info-circle blue'; 33 - break; 34 31 case PhabricatorConfigStorageSchema::STATUS_WARN: 35 32 $icon = 'fa-exclamation-circle yellow'; 36 33 break;
-6
src/applications/config/controller/PhabricatorConfigDatabaseIssueController.php
··· 145 145 new PhutilNumber($counts[PhabricatorConfigStorageSchema::STATUS_WARN])); 146 146 } 147 147 148 - if (isset($counts[PhabricatorConfigStorageSchema::STATUS_NOTE])) { 149 - $errors[] = pht( 150 - 'Detected %s minor issue(s) with the scheamata.', 151 - new PhutilNumber($counts[PhabricatorConfigStorageSchema::STATUS_NOTE])); 152 - } 153 - 154 148 $title = pht('Database Issues'); 155 149 156 150 $table_box = id(new PHUIObjectBoxView())
-4
src/applications/config/controller/PhabricatorConfigDatabaseStatusController.php
··· 710 710 711 711 $status = PhabricatorConfigStorageSchema::getIssueStatus($issue); 712 712 switch ($status) { 713 - case PhabricatorConfigStorageSchema::STATUS_NOTE: 714 - $icon = PHUIStatusItemView::ICON_INFO; 715 - $color = 'blue'; 716 - break; 717 713 case PhabricatorConfigStorageSchema::STATUS_WARN: 718 714 $icon = PHUIStatusItemView::ICON_WARNING; 719 715 $color = 'yellow';
+3 -16
src/applications/config/schema/PhabricatorConfigStorageSchema.php
··· 12 12 const ISSUE_NULLABLE = 'nullable'; 13 13 const ISSUE_KEYCOLUMNS = 'keycolumns'; 14 14 const ISSUE_UNIQUE = 'unique'; 15 - const ISSUE_SUBNOTE = 'subnote'; 16 15 const ISSUE_SUBWARN = 'subwarn'; 17 16 const ISSUE_SUBFAIL = 'subfail'; 18 17 19 18 const STATUS_OKAY = 'okay'; 20 - const STATUS_NOTE = 'note'; 21 19 const STATUS_WARN = 'warn'; 22 20 const STATUS_FAIL = 'fail'; 23 21 ··· 60 58 61 59 foreach ($this->getSubschemata() as $sub) { 62 60 switch ($sub->getStatus()) { 63 - case self::STATUS_NOTE: 64 - $issues[self::ISSUE_SUBNOTE] = self::ISSUE_SUBNOTE; 65 - break; 66 61 case self::STATUS_WARN: 67 62 $issues[self::ISSUE_SUBWARN] = self::ISSUE_SUBWARN; 68 63 break; ··· 122 117 return pht('Key on Wrong Columns'); 123 118 case self::ISSUE_UNIQUE: 124 119 return pht('Key has Wrong Uniqueness'); 125 - case self::ISSUE_SUBNOTE: 126 - return pht('Subschemata Have Notices'); 127 120 case self::ISSUE_SUBWARN: 128 121 return pht('Subschemata Have Warnings'); 129 122 case self::ISSUE_SUBFAIL: ··· 155 148 return pht('This schema is on the wrong columns.'); 156 149 case self::ISSUE_UNIQUE: 157 150 return pht('This key has the wrong uniqueness setting.'); 158 - case self::ISSUE_SUBNOTE: 159 - return pht('Subschemata have setup notices.'); 160 151 case self::ISSUE_SUBWARN: 161 152 return pht('Subschemata have setup warnings.'); 162 153 case self::ISSUE_SUBFAIL: ··· 170 161 switch ($issue) { 171 162 case self::ISSUE_MISSING: 172 163 case self::ISSUE_SURPLUS: 164 + case self::ISSUE_NULLABLE: 173 165 case self::ISSUE_SUBFAIL: 174 - case self::ISSUE_NULLABLE: 175 166 return self::STATUS_FAIL; 176 167 case self::ISSUE_SUBWARN: 177 168 case self::ISSUE_COLUMNTYPE: 178 - return self::STATUS_WARN; 179 - case self::ISSUE_SUBNOTE: 180 169 case self::ISSUE_CHARSET: 181 170 case self::ISSUE_COLLATION: 182 171 case self::ISSUE_MISSINGKEY: 183 172 case self::ISSUE_SURPLUSKEY: 184 173 case self::ISSUE_UNIQUE: 185 174 case self::ISSUE_KEYCOLUMNS: 186 - return self::STATUS_NOTE; 175 + return self::STATUS_WARN; 187 176 default: 188 177 throw new Exception(pht('Unknown schema issue "%s"!', $issue)); 189 178 } ··· 192 181 public static function getStatusSeverity($status) { 193 182 switch ($status) { 194 183 case self::STATUS_FAIL: 195 - return 3; 196 - case self::STATUS_WARN: 197 184 return 2; 198 - case self::STATUS_NOTE: 185 + case self::STATUS_WARN: 199 186 return 1; 200 187 case self::STATUS_OKAY: 201 188 return 0;