mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
Add missing expected keys and uniqueness
Summary: Ref T1191. - Adds definitions for missing keys and keys with wrong uniqueness. Generally, I defined these before fixing the key query to actually pull all keys and support uniqueness. - Moves "key uniqueness" to note severity; this is fixable (probably?) and there are no remaining issues. - Moves "Missing Key" to note severity; missing keys are fixable and all remaining missing keys are really missing (either missing edge keys, or missing PHID keys): {F210089} - Moves "Surplus Key" to note seveirty; surplus keys are fixable all remaining surplus keys are really surplus (duplicate key in Harbormaster, key on unused column in Worker): {F210090} Test Plan: - Vetted missing/surplus/unique messages. - 146 issues remaining. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10590
This commit is contained in:
parent
2880732a49
commit
943c62d1e9
52 changed files with 280 additions and 6 deletions
|
@ -24,6 +24,7 @@ final class PhabricatorAuditTransactionComment
|
||||||
|
|
||||||
public function getConfiguration() {
|
public function getConfiguration() {
|
||||||
$config = parent::getConfiguration();
|
$config = parent::getConfiguration();
|
||||||
|
|
||||||
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
||||||
'commitPHID' => 'phid?',
|
'commitPHID' => 'phid?',
|
||||||
'pathID' => 'id?',
|
'pathID' => 'id?',
|
||||||
|
@ -35,6 +36,22 @@ final class PhabricatorAuditTransactionComment
|
||||||
'replyToCommentPHID' => 'phid?',
|
'replyToCommentPHID' => 'phid?',
|
||||||
'legacyCommentID' => 'id?',
|
'legacyCommentID' => 'id?',
|
||||||
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
||||||
|
|
||||||
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
||||||
|
'key_path' => array(
|
||||||
|
'columns' => array('pathID'),
|
||||||
|
),
|
||||||
|
'key_draft' => array(
|
||||||
|
'columns' => array('authorPHID', 'transactionPHID'),
|
||||||
|
),
|
||||||
|
'key_commit' => array(
|
||||||
|
'columns' => array('commitPHID'),
|
||||||
|
),
|
||||||
|
'key_legacy' => array(
|
||||||
|
'columns' => array('legacyCommentID'),
|
||||||
|
),
|
||||||
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,11 @@ final class PhabricatorAuthFactorConfig extends PhabricatorAuthDAO {
|
||||||
'factorName' => 'text',
|
'factorName' => 'text',
|
||||||
'factorSecret' => 'text',
|
'factorSecret' => 'text',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_user' => array(
|
||||||
|
'columns' => array('userPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,15 @@ final class PhabricatorAuthProviderConfig extends PhabricatorAuthDAO
|
||||||
'shouldAllowUnlink' => 'bool',
|
'shouldAllowUnlink' => 'bool',
|
||||||
'shouldTrustEmails' => 'bool',
|
'shouldTrustEmails' => 'bool',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_provider' => array(
|
||||||
|
'columns' => array('providerType', 'providerDomain'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'key_class' => array(
|
||||||
|
'columns' => array('providerClass'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,10 @@ final class PhabricatorAuthTemporaryToken extends PhabricatorAuthDAO
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'key_token' => array(
|
'key_token' => array(
|
||||||
'columns' => array('objectPHID', 'tokenType', 'tokenCode'),
|
'columns' => array('objectPHID', 'tokenType', 'tokenCode'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'key_expires' => array(
|
||||||
|
'columns' => array('tokenExpires'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -20,9 +20,17 @@ final class PhabricatorCacheSchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||||
array(
|
array(
|
||||||
'PRIMARY' => array(
|
'PRIMARY' => array(
|
||||||
'columns' => array('id'),
|
'columns' => array('id'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
'key_cacheKeyHash' => array(
|
'key_cacheKeyHash' => array(
|
||||||
'columns' => array('cacheKeyHash'),
|
'columns' => array('cacheKeyHash'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'key_cacheCreated' => array(
|
||||||
|
'columns' => array('cacheCreated'),
|
||||||
|
),
|
||||||
|
'key_ttl' => array(
|
||||||
|
'columns' => array('cacheExpires'),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,10 @@ final class PhabricatorMarkupCache extends PhabricatorCacheDAO {
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'cacheKey' => array(
|
'cacheKey' => array(
|
||||||
'columns' => array('cacheKey'),
|
'columns' => array('cacheKey'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'dateCreated' => array(
|
||||||
|
'columns' => array('dateCreated'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -43,6 +43,11 @@ final class PhabricatorCalendarEvent
|
||||||
'status' => 'uint32',
|
'status' => 'uint32',
|
||||||
'description' => 'text',
|
'description' => 'text',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'userPHID_dateFrom' => array(
|
||||||
|
'columns' => array('userPHID', 'dateTo'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ final class PhabricatorCalendarHoliday extends PhabricatorCalendarDAO {
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'day' => array(
|
'day' => array(
|
||||||
'columns' => array('day'),
|
'columns' => array('day'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -20,6 +20,7 @@ final class PhabricatorChatLogChannel
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'key_channel' => array(
|
'key_channel' => array(
|
||||||
'columns' => array('channelName', 'serviceType', 'serviceName'),
|
'columns' => array('channelName', 'serviceType', 'serviceName'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -21,6 +21,11 @@ final class PhabricatorChatLogEvent
|
||||||
'type' => 'text4',
|
'type' => 'text4',
|
||||||
'message' => 'text',
|
'message' => 'text',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'channel' => array(
|
||||||
|
'columns' => array('epoch'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,11 @@ final class PhabricatorConduitCertificateToken extends PhabricatorConduitDAO {
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'userPHID' => array(
|
'userPHID' => array(
|
||||||
'columns' => array('userPHID'),
|
'columns' => array('userPHID'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
'token' => array(
|
'token' => array(
|
||||||
'columns' => array('token'),
|
'columns' => array('token'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -15,6 +15,11 @@ final class PhabricatorConduitConnectionLog extends PhabricatorConduitDAO {
|
||||||
'clientDescription' => 'text255?',
|
'clientDescription' => 'text255?',
|
||||||
'username' => 'text255?',
|
'username' => 'text255?',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_created' => array(
|
||||||
|
'columns' => array('dateCreated'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,17 @@ final class PhabricatorConduitMethodCallLog
|
||||||
'duration' => 'uint64',
|
'duration' => 'uint64',
|
||||||
'callerPHID' => 'phid?',
|
'callerPHID' => 'phid?',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_date' => array(
|
||||||
|
'columns' => array('dateCreated'),
|
||||||
|
),
|
||||||
|
'key_method' => array(
|
||||||
|
'columns' => array('method'),
|
||||||
|
),
|
||||||
|
'key_callermethod' => array(
|
||||||
|
'columns' => array('callerPHID', 'method'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,10 +89,17 @@ final class PhabricatorConfigDatabaseIssueController
|
||||||
foreach ($issues as $issue) {
|
foreach ($issues as $issue) {
|
||||||
$const = $issue[4];
|
$const = $issue[4];
|
||||||
|
|
||||||
|
$database_link = phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => $this->getApplicationURI('/database/'.$issue[0].'/'),
|
||||||
|
),
|
||||||
|
$issue[0]);
|
||||||
|
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
$this->renderIcon(
|
$this->renderIcon(
|
||||||
PhabricatorConfigStorageSchema::getIssueStatus($const)),
|
PhabricatorConfigStorageSchema::getIssueStatus($const)),
|
||||||
$issue[0],
|
$database_link,
|
||||||
$issue[1],
|
$issue[1],
|
||||||
$issue[2],
|
$issue[2],
|
||||||
$issue[3],
|
$issue[3],
|
||||||
|
|
|
@ -169,20 +169,20 @@ 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_MISSINGKEY:
|
|
||||||
case self::ISSUE_SUBFAIL:
|
case self::ISSUE_SUBFAIL:
|
||||||
return self::STATUS_FAIL;
|
|
||||||
case self::ISSUE_SURPLUS:
|
case self::ISSUE_SURPLUS:
|
||||||
case self::ISSUE_SURPLUSKEY:
|
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_KEYCOLUMNS:
|
||||||
case self::ISSUE_UNIQUE:
|
|
||||||
case self::ISSUE_NULLABLE:
|
case self::ISSUE_NULLABLE:
|
||||||
return self::STATUS_WARN;
|
return self::STATUS_WARN;
|
||||||
case self::ISSUE_SUBNOTE:
|
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_SURPLUSKEY:
|
||||||
|
case self::ISSUE_UNIQUE:
|
||||||
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));
|
||||||
|
|
|
@ -22,6 +22,7 @@ final class PhabricatorConfigEntry extends PhabricatorConfigEntryDAO
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'key_name' => array(
|
'key_name' => array(
|
||||||
'columns' => array('namespace', 'configKey'),
|
'columns' => array('namespace', 'configKey'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -23,6 +23,13 @@ final class ConpherenceParticipant extends ConpherenceDAO {
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'conpherencePHID' => array(
|
'conpherencePHID' => array(
|
||||||
'columns' => array('conpherencePHID', 'participantPHID'),
|
'columns' => array('conpherencePHID', 'participantPHID'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'unreadCount' => array(
|
||||||
|
'columns' => array('participantPHID', 'participationStatus'),
|
||||||
|
),
|
||||||
|
'participationIndex' => array(
|
||||||
|
'columns' => array('participantPHID', 'dateTouched', 'id'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -36,6 +36,7 @@ final class ConpherenceThread extends ConpherenceDAO
|
||||||
'key_phid' => null,
|
'key_phid' => null,
|
||||||
'phid' => array(
|
'phid' => array(
|
||||||
'columns' => array('phid'),
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -11,9 +11,18 @@ final class ConpherenceTransactionComment
|
||||||
|
|
||||||
public function getConfiguration() {
|
public function getConfiguration() {
|
||||||
$config = parent::getConfiguration();
|
$config = parent::getConfiguration();
|
||||||
|
|
||||||
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
||||||
'conpherencePHID' => 'phid?',
|
'conpherencePHID' => 'phid?',
|
||||||
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
||||||
|
|
||||||
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
||||||
|
'key_draft' => array(
|
||||||
|
'columns' => array('authorPHID', 'conpherencePHID', 'transactionPHID'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,14 @@ final class PhabricatorDaemonLog extends PhabricatorDaemonDAO
|
||||||
'envHash' => 'bytes40',
|
'envHash' => 'bytes40',
|
||||||
'status' => 'text8',
|
'status' => 'text8',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'status' => array(
|
||||||
|
'columns' => array('status'),
|
||||||
|
),
|
||||||
|
'dateCreated' => array(
|
||||||
|
'columns' => array('dateCreated'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,11 @@ final class PhabricatorDaemonLogEvent extends PhabricatorDaemonDAO {
|
||||||
'logType' => 'text4',
|
'logType' => 'text4',
|
||||||
'message' => 'text',
|
'message' => 'text',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'logID' => array(
|
||||||
|
'columns' => array('logID', 'epoch'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ final class PhabricatorDashboardInstall
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'objectPHID' => array(
|
'objectPHID' => array(
|
||||||
'columns' => array('objectPHID', 'applicationClass'),
|
'columns' => array('objectPHID', 'applicationClass'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -31,6 +31,15 @@ final class DoorkeeperExternalObject extends DoorkeeperDAO
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'key_object' => array(
|
'key_object' => array(
|
||||||
'columns' => array('objectKey'),
|
'columns' => array('objectKey'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'key_full' => array(
|
||||||
|
'columns' => array(
|
||||||
|
'applicationType',
|
||||||
|
'applicationDomain',
|
||||||
|
'objectType',
|
||||||
|
'objectID',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -21,6 +21,7 @@ final class PhabricatorDraft extends PhabricatorDraftDAO {
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'authorPHID' => array(
|
'authorPHID' => array(
|
||||||
'columns' => array('authorPHID', 'draftKey'),
|
'columns' => array('authorPHID', 'draftKey'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -55,6 +55,7 @@ final class DrydockLease extends DrydockDAO
|
||||||
'key_phid' => null,
|
'key_phid' => null,
|
||||||
'phid' => array(
|
'phid' => array(
|
||||||
'columns' => array('phid'),
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -19,6 +19,17 @@ final class DrydockLog extends DrydockDAO
|
||||||
'leaseID' => 'id?',
|
'leaseID' => 'id?',
|
||||||
'message' => 'text',
|
'message' => 'text',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'resourceID' => array(
|
||||||
|
'columns' => array('resourceID', 'epoch'),
|
||||||
|
),
|
||||||
|
'leaseID' => array(
|
||||||
|
'columns' => array('leaseID', 'epoch'),
|
||||||
|
),
|
||||||
|
'epoch' => array(
|
||||||
|
'columns' => array('epoch'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ final class DrydockResource extends DrydockDAO
|
||||||
'key_phid' => null,
|
'key_phid' => null,
|
||||||
'phid' => array(
|
'phid' => array(
|
||||||
'columns' => array('phid'),
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -23,9 +23,11 @@ final class PhabricatorFeedStoryData extends PhabricatorFeedDAO {
|
||||||
'key_phid' => null,
|
'key_phid' => null,
|
||||||
'phid' => array(
|
'phid' => array(
|
||||||
'columns' => array('phid'),
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
'chronologicalKey' => array(
|
'chronologicalKey' => array(
|
||||||
'columns' => array('chronologicalKey'),
|
'columns' => array('chronologicalKey'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -17,6 +17,10 @@ final class PhabricatorFeedStoryReference extends PhabricatorFeedDAO {
|
||||||
'PRIMARY' => null,
|
'PRIMARY' => null,
|
||||||
'objectPHID' => array(
|
'objectPHID' => array(
|
||||||
'columns' => array('objectPHID', 'chronologicalKey'),
|
'columns' => array('objectPHID', 'chronologicalKey'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'chronologicalKey' => array(
|
||||||
|
'columns' => array('chronologicalKey'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -68,7 +68,7 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
||||||
self::CONFIG_COLUMN_SCHEMA => array(
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
'name' => 'text255?',
|
'name' => 'text255?',
|
||||||
'mimeType' => 'text255?',
|
'mimeType' => 'text255?',
|
||||||
'byteSize' => 'uint64?',
|
'byteSize' => 'uint64',
|
||||||
'storageEngine' => 'text32',
|
'storageEngine' => 'text32',
|
||||||
'storageFormat' => 'text32',
|
'storageFormat' => 'text32',
|
||||||
'storageHandle' => 'text255',
|
'storageHandle' => 'text255',
|
||||||
|
@ -83,6 +83,19 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
||||||
'key_phid' => null,
|
'key_phid' => null,
|
||||||
'phid' => array(
|
'phid' => array(
|
||||||
'columns' => array('phid'),
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'authorPHID' => array(
|
||||||
|
'columns' => array('authorPHID'),
|
||||||
|
),
|
||||||
|
'contentHash' => array(
|
||||||
|
'columns' => array('contentHash'),
|
||||||
|
),
|
||||||
|
'key_ttl' => array(
|
||||||
|
'columns' => array('ttl'),
|
||||||
|
),
|
||||||
|
'key_dateCreated' => array(
|
||||||
|
'columns' => array('dateCreated'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -17,6 +17,7 @@ final class PhabricatorFileTransactionComment
|
||||||
$config[self::CONFIG_KEY_SCHEMA] = array(
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
||||||
'key_draft' => array(
|
'key_draft' => array(
|
||||||
'columns' => array('authorPHID', 'transactionPHID'),
|
'columns' => array('authorPHID', 'transactionPHID'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
) + $config[self::CONFIG_KEY_SCHEMA];
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
||||||
return $config;
|
return $config;
|
||||||
|
|
|
@ -14,6 +14,10 @@ final class PhabricatorTransformedFile extends PhabricatorFileDAO {
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'originalPHID' => array(
|
'originalPHID' => array(
|
||||||
'columns' => array('originalPHID', 'transform'),
|
'columns' => array('originalPHID', 'transform'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'transformedPHID' => array(
|
||||||
|
'columns' => array('transformedPHID'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -23,6 +23,10 @@ final class PhabricatorFlag extends PhabricatorFlagDAO
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'ownerPHID' => array(
|
'ownerPHID' => array(
|
||||||
'columns' => array('ownerPHID', 'type', 'objectPHID'),
|
'columns' => array('ownerPHID', 'type', 'objectPHID'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'objectPHID' => array(
|
||||||
|
'columns' => array('objectPHID'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -32,6 +32,14 @@ final class FundBacker extends FundDAO
|
||||||
'status' => 'text32',
|
'status' => 'text32',
|
||||||
'amountInCents' => 'uint32',
|
'amountInCents' => 'uint32',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_initiative' => array(
|
||||||
|
'columns' => array('initiativePHID'),
|
||||||
|
),
|
||||||
|
'key_backer' => array(
|
||||||
|
'columns' => array('backerPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,14 @@ final class FundInitiative extends FundDAO
|
||||||
'description' => 'text',
|
'description' => 'text',
|
||||||
'status' => 'text32',
|
'status' => 'text32',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_status' => array(
|
||||||
|
'columns' => array('status'),
|
||||||
|
),
|
||||||
|
'key_owner' => array(
|
||||||
|
'columns' => array('ownerPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ final class HeraldTranscript extends HeraldDAO
|
||||||
|
|
||||||
protected $objectPHID;
|
protected $objectPHID;
|
||||||
protected $dryRun;
|
protected $dryRun;
|
||||||
|
protected $garbageCollected = 0;
|
||||||
|
|
||||||
const TABLE_SAVED_HEADER = 'herald_savedheader';
|
const TABLE_SAVED_HEADER = 'herald_savedheader';
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,11 @@ final class LegalpadDocument extends LegalpadDAO
|
||||||
'signatureType' => 'text4',
|
'signatureType' => 'text4',
|
||||||
'preamble' => 'text',
|
'preamble' => 'text',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_creator' => array(
|
||||||
|
'columns' => array('creatorPHID', 'dateModified'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ final class LegalpadDocumentBody extends LegalpadDAO
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'key_document' => array(
|
'key_document' => array(
|
||||||
'columns' => array('documentPHID', 'version'),
|
'columns' => array('documentPHID', 'version'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -37,6 +37,17 @@ final class LegalpadDocumentSignature
|
||||||
'isExemption' => 'bool',
|
'isExemption' => 'bool',
|
||||||
'exemptionPHID' => 'phid?',
|
'exemptionPHID' => 'phid?',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_signer' => array(
|
||||||
|
'columns' => array('signerPHID', 'dateModified'),
|
||||||
|
),
|
||||||
|
'secretKey' => array(
|
||||||
|
'columns' => array('secretKey'),
|
||||||
|
),
|
||||||
|
'key_document' => array(
|
||||||
|
'columns' => array('documentPHID', 'signerPHID', 'documentVersion'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ final class LegalpadTransactionComment
|
||||||
$config[self::CONFIG_KEY_SCHEMA] = array(
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
||||||
'key_draft' => array(
|
'key_draft' => array(
|
||||||
'columns' => array('authorPHID', 'documentID', 'transactionPHID'),
|
'columns' => array('authorPHID', 'documentID', 'transactionPHID'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
) + $config[self::CONFIG_KEY_SCHEMA];
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
||||||
return $config;
|
return $config;
|
||||||
|
|
|
@ -54,6 +54,13 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'name' => array(
|
'name' => array(
|
||||||
'columns' => array('name'),
|
'columns' => array('name'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'key_disabled' => array(
|
||||||
|
'columns' => array('isDisabled'),
|
||||||
|
),
|
||||||
|
'key_dateCreated' => array(
|
||||||
|
'columns' => array('dateCreated'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -20,6 +20,10 @@ final class PhabricatorFeedStoryNotification extends PhabricatorFeedDAO {
|
||||||
'PRIMARY' => null,
|
'PRIMARY' => null,
|
||||||
'userPHID' => array(
|
'userPHID' => array(
|
||||||
'columns' => array('userPHID', 'chronologicalKey'),
|
'columns' => array('userPHID', 'chronologicalKey'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'userPHID_2' => array(
|
||||||
|
'columns' => array('userPHID', 'hasViewed', 'primaryObjectPHID'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -5,6 +5,7 @@ final class NuanceRequestorSource
|
||||||
|
|
||||||
protected $requestorPHID;
|
protected $requestorPHID;
|
||||||
protected $sourcePHID;
|
protected $sourcePHID;
|
||||||
|
protected $sourceKey;
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
public function getConfiguration() {
|
public function getConfiguration() {
|
||||||
|
@ -12,6 +13,21 @@ final class NuanceRequestorSource
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'data' => self::SERIALIZATION_JSON,
|
'data' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'sourceKey' => 'text128',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_source_key' => array(
|
||||||
|
'columns' => array('sourcePHID', 'sourceKey'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'key_requestor' => array(
|
||||||
|
'columns' => array('requestorPHID', 'id'),
|
||||||
|
),
|
||||||
|
'key_source' => array(
|
||||||
|
'columns' => array('sourcePHID', 'id'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ final class PholioTransactionComment
|
||||||
$config[self::CONFIG_KEY_SCHEMA] = array(
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
||||||
'key_draft' => array(
|
'key_draft' => array(
|
||||||
'columns' => array('authorPHID', 'imageID', 'transactionPHID'),
|
'columns' => array('authorPHID', 'imageID', 'transactionPHID'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
) + $config[self::CONFIG_KEY_SCHEMA];
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
||||||
|
|
||||||
|
|
|
@ -6,4 +6,17 @@ final class PhabricatorSlowvoteChoice extends PhabricatorSlowvoteDAO {
|
||||||
protected $optionID;
|
protected $optionID;
|
||||||
protected $authorPHID;
|
protected $authorPHID;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'pollID' => array(
|
||||||
|
'columns' => array('pollID'),
|
||||||
|
),
|
||||||
|
'authorPHID' => array(
|
||||||
|
'columns' => array('authorPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,11 @@ final class PhabricatorSlowvoteOption extends PhabricatorSlowvoteDAO {
|
||||||
self::CONFIG_COLUMN_SCHEMA => array(
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
'name' => 'text255',
|
'name' => 'text255',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'pollID' => array(
|
||||||
|
'columns' => array('pollID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ final class PhabricatorSlowvotePoll extends PhabricatorSlowvoteDAO
|
||||||
'key_phid' => null,
|
'key_phid' => null,
|
||||||
'phid' => array(
|
'phid' => array(
|
||||||
'columns' => array('phid'),
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -17,6 +17,14 @@ final class PhabricatorSystemActionLog extends PhabricatorSystemDAO {
|
||||||
'action' => 'text32',
|
'action' => 'text32',
|
||||||
'score' => 'double',
|
'score' => 'double',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_epoch' => array(
|
||||||
|
'columns' => array('epoch'),
|
||||||
|
),
|
||||||
|
'key_action' => array(
|
||||||
|
'columns' => array('actorHash', 'action', 'epoch'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,11 @@ final class PhabricatorSystemDestructionLog extends PhabricatorSystemDAO {
|
||||||
'objectPHID' => 'phid?',
|
'objectPHID' => 'phid?',
|
||||||
'objectMonogram' => 'text64?',
|
'objectMonogram' => 'text64?',
|
||||||
),
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_epoch' => array(
|
||||||
|
'columns' => array('epoch'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,10 @@ final class PhabricatorTokenCount extends PhabricatorTokenDAO {
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'key_objectPHID' => array(
|
'key_objectPHID' => array(
|
||||||
'columns' => array('objectPHID'),
|
'columns' => array('objectPHID'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'key_count' => array(
|
||||||
|
'columns' => array('tokenCount'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -14,6 +14,13 @@ final class PhabricatorTokenGiven extends PhabricatorTokenDAO
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'key_all' => array(
|
'key_all' => array(
|
||||||
'columns' => array('objectPHID', 'authorPHID'),
|
'columns' => array('objectPHID', 'authorPHID'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'key_author' => array(
|
||||||
|
'columns' => array('authorPHID'),
|
||||||
|
),
|
||||||
|
'key_token' => array(
|
||||||
|
'columns' => array('tokenPHID'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
|
@ -23,6 +23,7 @@ final class PhabricatorXHProfSample extends PhabricatorXHProfDAO {
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'filePHID' => array(
|
'filePHID' => array(
|
||||||
'columns' => array('filePHID'),
|
'columns' => array('filePHID'),
|
||||||
|
'unique' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
|
|
Loading…
Reference in a new issue