mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Ignore keys with trailing index on table primary key for now
Summary: Ref T1191. We have several keys on `<x, y, id>`. When `id` is an auto-increment primary key, I believe this is exactly equivalent to a key on `<x, y>`, because the leaf nodes are implicitly sorted by `id`. We omit the implicit `id` elsewhere. It would be nice to drop the `id` bit for consistency, but it's not doing any harm and this doesn't need to block the primary work of T1191. Test Plan: Saw slightly fewer warnings. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10592
This commit is contained in:
parent
8bf24f53b3
commit
4f87adc438
4 changed files with 17 additions and 7 deletions
|
@ -169,12 +169,11 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
|
||||||
public static function getIssueStatus($issue) {
|
public static function getIssueStatus($issue) {
|
||||||
switch ($issue) {
|
switch ($issue) {
|
||||||
case self::ISSUE_MISSING:
|
case self::ISSUE_MISSING:
|
||||||
case self::ISSUE_SUBFAIL:
|
|
||||||
case self::ISSUE_SURPLUS:
|
case self::ISSUE_SURPLUS:
|
||||||
|
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:
|
||||||
case self::ISSUE_KEYCOLUMNS:
|
|
||||||
case self::ISSUE_NULLABLE:
|
case self::ISSUE_NULLABLE:
|
||||||
return self::STATUS_WARN;
|
return self::STATUS_WARN;
|
||||||
case self::ISSUE_SUBNOTE:
|
case self::ISSUE_SUBNOTE:
|
||||||
|
@ -183,6 +182,7 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
|
||||||
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:
|
||||||
return self::STATUS_NOTE;
|
return self::STATUS_NOTE;
|
||||||
default:
|
default:
|
||||||
throw new Exception(pht('Unknown schema issue "%s"!', $issue));
|
throw new Exception(pht('Unknown schema issue "%s"!', $issue));
|
||||||
|
|
|
@ -38,13 +38,13 @@ final class NuanceItem
|
||||||
),
|
),
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'key_source' => array(
|
'key_source' => array(
|
||||||
'columns' => array('sourcePHID', 'status', 'dateNuanced'),
|
'columns' => array('sourcePHID', 'status', 'dateNuanced', 'id'),
|
||||||
),
|
),
|
||||||
'key_owner' => array(
|
'key_owner' => array(
|
||||||
'columns' => array('ownerPHID', 'status', 'dateNuanced'),
|
'columns' => array('ownerPHID', 'status', 'dateNuanced', 'id'),
|
||||||
),
|
),
|
||||||
'key_contacter' => array(
|
'key_contacter' => array(
|
||||||
'columns' => array('requestorPHID', 'status', 'dateNuanced'),
|
'columns' => array('requestorPHID', 'status', 'dateNuanced', 'id'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -20,7 +20,12 @@ final class NuanceQueueItem
|
||||||
'unique' => true,
|
'unique' => true,
|
||||||
),
|
),
|
||||||
'key_queue' => array(
|
'key_queue' => array(
|
||||||
'columns' => array('queuePHID', 'itemStatus', 'itemDateNuanced'),
|
'columns' => array(
|
||||||
|
'queuePHID',
|
||||||
|
'itemStatus',
|
||||||
|
'itemDateNuanced',
|
||||||
|
'id',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -106,7 +106,12 @@ final class PhamePost extends PhameDAO
|
||||||
'unique' => true,
|
'unique' => true,
|
||||||
),
|
),
|
||||||
'bloggerPosts' => array(
|
'bloggerPosts' => array(
|
||||||
'columns' => array('bloggerPHID', 'visibility', 'datePublished'),
|
'columns' => array(
|
||||||
|
'bloggerPHID',
|
||||||
|
'visibility',
|
||||||
|
'datePublished',
|
||||||
|
'id',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
Loading…
Reference in a new issue