mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +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) {
|
||||
switch ($issue) {
|
||||
case self::ISSUE_MISSING:
|
||||
case self::ISSUE_SUBFAIL:
|
||||
case self::ISSUE_SURPLUS:
|
||||
case self::ISSUE_SUBFAIL:
|
||||
return self::STATUS_FAIL;
|
||||
case self::ISSUE_SUBWARN:
|
||||
case self::ISSUE_COLUMNTYPE:
|
||||
case self::ISSUE_KEYCOLUMNS:
|
||||
case self::ISSUE_NULLABLE:
|
||||
return self::STATUS_WARN;
|
||||
case self::ISSUE_SUBNOTE:
|
||||
|
@ -183,6 +182,7 @@ abstract class PhabricatorConfigStorageSchema extends Phobject {
|
|||
case self::ISSUE_MISSINGKEY:
|
||||
case self::ISSUE_SURPLUSKEY:
|
||||
case self::ISSUE_UNIQUE:
|
||||
case self::ISSUE_KEYCOLUMNS:
|
||||
return self::STATUS_NOTE;
|
||||
default:
|
||||
throw new Exception(pht('Unknown schema issue "%s"!', $issue));
|
||||
|
|
|
@ -38,13 +38,13 @@ final class NuanceItem
|
|||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'key_source' => array(
|
||||
'columns' => array('sourcePHID', 'status', 'dateNuanced'),
|
||||
'columns' => array('sourcePHID', 'status', 'dateNuanced', 'id'),
|
||||
),
|
||||
'key_owner' => array(
|
||||
'columns' => array('ownerPHID', 'status', 'dateNuanced'),
|
||||
'columns' => array('ownerPHID', 'status', 'dateNuanced', 'id'),
|
||||
),
|
||||
'key_contacter' => array(
|
||||
'columns' => array('requestorPHID', 'status', 'dateNuanced'),
|
||||
'columns' => array('requestorPHID', 'status', 'dateNuanced', 'id'),
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
|
|
|
@ -20,7 +20,12 @@ final class NuanceQueueItem
|
|||
'unique' => true,
|
||||
),
|
||||
'key_queue' => array(
|
||||
'columns' => array('queuePHID', 'itemStatus', 'itemDateNuanced'),
|
||||
'columns' => array(
|
||||
'queuePHID',
|
||||
'itemStatus',
|
||||
'itemDateNuanced',
|
||||
'id',
|
||||
),
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
|
|
|
@ -106,7 +106,12 @@ final class PhamePost extends PhameDAO
|
|||
'unique' => true,
|
||||
),
|
||||
'bloggerPosts' => array(
|
||||
'columns' => array('bloggerPHID', 'visibility', 'datePublished'),
|
||||
'columns' => array(
|
||||
'bloggerPHID',
|
||||
'visibility',
|
||||
'datePublished',
|
||||
'id',
|
||||
),
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
|
|
Loading…
Reference in a new issue