@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.

Generate expected schemata for MetaMTA, Nuance, MetaData, OAuthServer

Summary: Ref T1191. Handful of minor things here (T6150, T6149, T6148, T6147, T6146) but nothing very noteworthy.

Test Plan: Viewed web UI, saw fewer errors.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10527

+273
+8
src/__phutil_library_map__.php
··· 992 992 'NuanceRequestorTransactionComment' => 'applications/nuance/storage/NuanceRequestorTransactionComment.php', 993 993 'NuanceRequestorTransactionQuery' => 'applications/nuance/query/NuanceRequestorTransactionQuery.php', 994 994 'NuanceRequestorViewController' => 'applications/nuance/controller/NuanceRequestorViewController.php', 995 + 'NuanceSchemaSpec' => 'applications/nuance/storage/NuanceSchemaSpec.php', 995 996 'NuanceSource' => 'applications/nuance/storage/NuanceSource.php', 996 997 'NuanceSourceDefaultEditCapability' => 'applications/nuance/capability/NuanceSourceDefaultEditCapability.php', 997 998 'NuanceSourceDefaultViewCapability' => 'applications/nuance/capability/NuanceSourceDefaultViewCapability.php', ··· 1808 1809 'PhabricatorMetaMTAReceivedMail' => 'applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php', 1809 1810 'PhabricatorMetaMTAReceivedMailProcessingException' => 'applications/metamta/exception/PhabricatorMetaMTAReceivedMailProcessingException.php', 1810 1811 'PhabricatorMetaMTAReceivedMailTestCase' => 'applications/metamta/storage/__tests__/PhabricatorMetaMTAReceivedMailTestCase.php', 1812 + 'PhabricatorMetaMTASchemaSpec' => 'applications/metamta/storage/PhabricatorMetaMTASchemaSpec.php', 1811 1813 'PhabricatorMetaMTASendGridReceiveController' => 'applications/metamta/controller/PhabricatorMetaMTASendGridReceiveController.php', 1812 1814 'PhabricatorMetaMTAWorker' => 'applications/metamta/PhabricatorMetaMTAWorker.php', 1813 1815 'PhabricatorMultiColumnExample' => 'applications/uiexample/examples/PhabricatorMultiColumnExample.php', ··· 1844 1846 'PhabricatorOAuthClientListController' => 'applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php', 1845 1847 'PhabricatorOAuthClientViewController' => 'applications/oauthserver/controller/client/PhabricatorOAuthClientViewController.php', 1846 1848 'PhabricatorOAuthResponse' => 'applications/oauthserver/PhabricatorOAuthResponse.php', 1849 + 'PhabricatorOAuthSchemaSpec' => 'applications/oauthserver/storage/PhabricatorOAuthSchemaSpec.php', 1847 1850 'PhabricatorOAuthServer' => 'applications/oauthserver/PhabricatorOAuthServer.php', 1848 1851 'PhabricatorOAuthServerAccessToken' => 'applications/oauthserver/storage/PhabricatorOAuthServerAccessToken.php', 1849 1852 'PhabricatorOAuthServerApplication' => 'applications/oauthserver/application/PhabricatorOAuthServerApplication.php', ··· 2305 2308 'PhabricatorStorageManagementUpgradeWorkflow' => 'infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php', 2306 2309 'PhabricatorStorageManagementWorkflow' => 'infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php', 2307 2310 'PhabricatorStoragePatch' => 'infrastructure/storage/management/PhabricatorStoragePatch.php', 2311 + 'PhabricatorStorageSchemaSpec' => 'infrastructure/storage/schema/PhabricatorStorageSchemaSpec.php', 2308 2312 'PhabricatorSubscribableInterface' => 'applications/subscriptions/interface/PhabricatorSubscribableInterface.php', 2309 2313 'PhabricatorSubscribersQuery' => 'applications/subscriptions/query/PhabricatorSubscribersQuery.php', 2310 2314 'PhabricatorSubscriptionsApplication' => 'applications/subscriptions/application/PhabricatorSubscriptionsApplication.php', ··· 3892 3896 'NuanceRequestorTransactionComment' => 'PhabricatorApplicationTransactionComment', 3893 3897 'NuanceRequestorTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 3894 3898 'NuanceRequestorViewController' => 'NuanceController', 3899 + 'NuanceSchemaSpec' => 'PhabricatorConfigSchemaSpec', 3895 3900 'NuanceSource' => array( 3896 3901 'NuanceDAO', 3897 3902 'PhabricatorPolicyInterface', ··· 4738 4743 'PhabricatorMetaMTAReceivedMail' => 'PhabricatorMetaMTADAO', 4739 4744 'PhabricatorMetaMTAReceivedMailProcessingException' => 'Exception', 4740 4745 'PhabricatorMetaMTAReceivedMailTestCase' => 'PhabricatorTestCase', 4746 + 'PhabricatorMetaMTASchemaSpec' => 'PhabricatorConfigSchemaSpec', 4741 4747 'PhabricatorMetaMTASendGridReceiveController' => 'PhabricatorMetaMTAController', 4742 4748 'PhabricatorMetaMTAWorker' => 'PhabricatorWorker', 4743 4749 'PhabricatorMultiColumnExample' => 'PhabricatorUIExample', ··· 4778 4784 'PhabricatorOAuthClientListController' => 'PhabricatorOAuthClientController', 4779 4785 'PhabricatorOAuthClientViewController' => 'PhabricatorOAuthClientController', 4780 4786 'PhabricatorOAuthResponse' => 'AphrontResponse', 4787 + 'PhabricatorOAuthSchemaSpec' => 'PhabricatorConfigSchemaSpec', 4781 4788 'PhabricatorOAuthServerAccessToken' => 'PhabricatorOAuthServerDAO', 4782 4789 'PhabricatorOAuthServerApplication' => 'PhabricatorApplication', 4783 4790 'PhabricatorOAuthServerAuthController' => 'PhabricatorAuthController', ··· 5283 5290 'PhabricatorStorageManagementStatusWorkflow' => 'PhabricatorStorageManagementWorkflow', 5284 5291 'PhabricatorStorageManagementUpgradeWorkflow' => 'PhabricatorStorageManagementWorkflow', 5285 5292 'PhabricatorStorageManagementWorkflow' => 'PhabricatorManagementWorkflow', 5293 + 'PhabricatorStorageSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5286 5294 'PhabricatorSubscribersQuery' => 'PhabricatorQuery', 5287 5295 'PhabricatorSubscriptionsApplication' => 'PhabricatorApplication', 5288 5296 'PhabricatorSubscriptionsEditController' => 'PhabricatorController',
+5
src/applications/config/schema/PhabricatorConfigSchemaSpec.php
··· 271 271 $charset = $this->getUTF8Charset(); 272 272 $collation = $this->getUTF8Collation(); 273 273 break; 274 + case 'text40': 275 + $column_type = 'varchar(40)'; 276 + $charset = $this->getUTF8Charset(); 277 + $collation = $this->getUTF8Collation(); 278 + break; 274 279 case 'text32': 275 280 $column_type = 'varchar(32)'; 276 281 $charset = $this->getUTF8Charset();
+20
src/applications/mailinglists/storage/PhabricatorMetaMTAMailingList.php
··· 17 17 public function getConfiguration() { 18 18 return array( 19 19 self::CONFIG_AUX_PHID => true, 20 + self::CONFIG_COLUMN_SCHEMA => array( 21 + 'name' => 'text255', 22 + 'email' => 'text255', 23 + 'uri' => 'text255?', 24 + ), 25 + self::CONFIG_KEY_SCHEMA => array( 26 + 'key_phid' => null, 27 + 'phid' => array( 28 + 'columns' => array('phid'), 29 + 'unique' => true, 30 + ), 31 + 'email' => array( 32 + 'columns' => array('email'), 33 + 'unique' => true, 34 + ), 35 + 'name' => array( 36 + 'columns' => array('name'), 37 + 'unique' => true, 38 + ), 39 + ), 20 40 ) + parent::getConfiguration(); 21 41 } 22 42
+16
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
··· 32 32 self::CONFIG_SERIALIZATION => array( 33 33 'parameters' => self::SERIALIZATION_JSON, 34 34 ), 35 + self::CONFIG_COLUMN_SCHEMA => array( 36 + 'status' => 'text255', 37 + 'message' => 'text', 38 + 'relatedPHID' => 'phid?', 39 + ), 40 + self::CONFIG_KEY_SCHEMA => array( 41 + 'status' => array( 42 + 'columns' => array('status'), 43 + ), 44 + 'relatedPHID' => array( 45 + 'columns' => array('relatedPHID'), 46 + ), 47 + 'key_created' => array( 48 + 'columns' => array('dateCreated'), 49 + ), 50 + ), 35 51 ) + parent::getConfiguration(); 36 52 } 37 53
+21
src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php
··· 19 19 'bodies' => self::SERIALIZATION_JSON, 20 20 'attachments' => self::SERIALIZATION_JSON, 21 21 ), 22 + self::CONFIG_COLUMN_SCHEMA => array( 23 + 'relatedPHID' => 'phid?', 24 + 'authorPHID' => 'phid?', 25 + 'message' => 'text?', 26 + 'messageIDHash' => 'bytes12', 27 + 'status' => 'text32', 28 + ), 29 + self::CONFIG_KEY_SCHEMA => array( 30 + 'relatedPHID' => array( 31 + 'columns' => array('relatedPHID'), 32 + ), 33 + 'authorPHID' => array( 34 + 'columns' => array('authorPHID'), 35 + ), 36 + 'key_messageIDHash' => array( 37 + 'columns' => array('messageIDHash'), 38 + ), 39 + 'key_created' => array( 40 + 'columns' => array('dateCreated'), 41 + ), 42 + ), 22 43 ) + parent::getConfiguration(); 23 44 } 24 45
+14
src/applications/metamta/storage/PhabricatorMetaMTASchemaSpec.php
··· 1 + <?php 2 + 3 + final class PhabricatorMetaMTASchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildLiskSchemata('PhabricatorMetaMTADAO'); 8 + $this->buildLiskSchemata('PhabricatorSMSDAO'); 9 + 10 + $this->buildEdgeSchemata( 11 + new PhabricatorMetaMTAMail()); 12 + } 13 + 14 + }
+19
src/applications/nuance/storage/NuanceItem.php
··· 22 22 ->setDateNuanced(time()) 23 23 ->setStatus(NuanceItem::STATUS_OPEN); 24 24 } 25 + 25 26 public function getConfiguration() { 26 27 return array( 27 28 self::CONFIG_AUX_PHID => true, 28 29 self::CONFIG_SERIALIZATION => array( 29 30 'data' => self::SERIALIZATION_JSON, 31 + ), 32 + self::CONFIG_COLUMN_SCHEMA => array( 33 + 'ownerPHID' => 'phid?', 34 + 'sourceLabel' => 'text255?', 35 + 'status' => 'uint32', 36 + 'mailKey' => 'bytes20', 37 + 'dateNuanced' => 'epoch', 38 + ), 39 + self::CONFIG_KEY_SCHEMA => array( 40 + 'key_source' => array( 41 + 'columns' => array('sourcePHID', 'status', 'dateNuanced'), 42 + ), 43 + 'key_owner' => array( 44 + 'columns' => array('ownerPHID', 'status', 'dateNuanced'), 45 + ), 46 + 'key_contacter' => array( 47 + 'columns' => array('requestorPHID', 'status', 'dateNuanced'), 48 + ), 30 49 ), 31 50 ) + parent::getConfiguration(); 32 51 }
+4
src/applications/nuance/storage/NuanceQueue.php
··· 12 12 public function getConfiguration() { 13 13 return array( 14 14 self::CONFIG_AUX_PHID => true, 15 + self::CONFIG_COLUMN_SCHEMA => array( 16 + 'name' => 'text255?', 17 + 'mailKey' => 'bytes20', 18 + ), 15 19 ) + parent::getConfiguration(); 16 20 } 17 21
+17
src/applications/nuance/storage/NuanceQueueItem.php
··· 8 8 protected $itemStatus; 9 9 protected $itemDateNuanced; 10 10 11 + public function getConfiguration() { 12 + return array( 13 + self::CONFIG_COLUMN_SCHEMA => array( 14 + 'itemStatus' => 'uint32', 15 + 'itemDateNuanced' => 'epoch', 16 + ), 17 + self::CONFIG_KEY_SCHEMA => array( 18 + 'key_one_per_queue' => array( 19 + 'columns' => array('itemPHID', 'queuePHID'), 20 + 'unique' => true, 21 + ), 22 + 'key_queue' => array( 23 + 'columns' => array('queuePHID', 'itemStatus', 'itemDateNuanced'), 24 + ), 25 + ), 26 + ) + parent::getConfiguration(); 27 + } 11 28 12 29 }
+27
src/applications/nuance/storage/NuanceSchemaSpec.php
··· 1 + <?php 2 + 3 + final class NuanceSchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildLiskSchemata('NuanceDAO'); 8 + $this->buildEdgeSchemata(new NuanceItem()); 9 + 10 + $this->buildTransactionSchema( 11 + new NuanceItemTransaction(), 12 + new NuanceItemTransactionComment()); 13 + 14 + $this->buildTransactionSchema( 15 + new NuanceQueueTransaction(), 16 + new NuanceQueueTransactionComment()); 17 + 18 + $this->buildTransactionSchema( 19 + new NuanceRequestorTransaction(), 20 + new NuanceRequestorTransactionComment()); 21 + 22 + $this->buildTransactionSchema( 23 + new NuanceSourceTransaction(), 24 + new NuanceSourceTransactionComment()); 25 + } 26 + 27 + }
+10
src/applications/nuance/storage/NuanceSource.php
··· 16 16 self::CONFIG_SERIALIZATION => array( 17 17 'data' => self::SERIALIZATION_JSON, 18 18 ), 19 + self::CONFIG_COLUMN_SCHEMA => array( 20 + 'name' => 'text255?', 21 + 'type' => 'text32', 22 + 'mailKey' => 'bytes20', 23 + ), 24 + self::CONFIG_KEY_SCHEMA => array( 25 + 'key_type' => array( 26 + 'columns' => array('type', 'dateModified'), 27 + ), 28 + ), 19 29 ) + parent::getConfiguration(); 20 30 } 21 31
+14
src/applications/oauthserver/storage/PhabricatorOAuthClientAuthorization.php
··· 23 23 self::CONFIG_SERIALIZATION => array( 24 24 'scope' => self::SERIALIZATION_JSON, 25 25 ), 26 + self::CONFIG_COLUMN_SCHEMA => array( 27 + 'scope' => 'text', 28 + ), 29 + self::CONFIG_KEY_SCHEMA => array( 30 + 'key_phid' => null, 31 + 'phid' => array( 32 + 'columns' => array('phid'), 33 + 'unique' => true, 34 + ), 35 + 'userPHID' => array( 36 + 'columns' => array('userPHID', 'clientPHID'), 37 + 'unique' => true, 38 + ), 39 + ), 26 40 ) + parent::getConfiguration(); 27 41 } 28 42
+10
src/applications/oauthserver/storage/PhabricatorOAuthSchemaSpec.php
··· 1 + <?php 2 + 3 + final class PhabricatorOAuthSchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildLiskSchemata('PhabricatorOAuthServerDAO'); 8 + } 9 + 10 + }
+15
src/applications/oauthserver/storage/PhabricatorOAuthServerAccessToken.php
··· 7 7 protected $token; 8 8 protected $userPHID; 9 9 protected $clientPHID; 10 + 11 + public function getConfiguration() { 12 + return array( 13 + self::CONFIG_COLUMN_SCHEMA => array( 14 + 'token' => 'text32', 15 + ), 16 + self::CONFIG_KEY_SCHEMA => array( 17 + 'token' => array( 18 + 'columns' => array('token'), 19 + 'unique' => true, 20 + ), 21 + ), 22 + ) + parent::getConfiguration(); 23 + } 24 + 10 25 }
+17
src/applications/oauthserver/storage/PhabricatorOAuthServerAuthorizationCode.php
··· 9 9 protected $clientSecret; 10 10 protected $userPHID; 11 11 protected $redirectURI; 12 + 13 + public function getConfiguration() { 14 + return array( 15 + self::CONFIG_COLUMN_SCHEMA => array( 16 + 'code' => 'text32', 17 + 'clientSecret' => 'text32', 18 + 'redirectURI' => 'text255', 19 + ), 20 + self::CONFIG_KEY_SCHEMA => array( 21 + 'code' => array( 22 + 'columns' => array('code'), 23 + 'unique' => true, 24 + ), 25 + ), 26 + ) + parent::getConfiguration(); 27 + } 28 + 12 29 }
+15
src/applications/oauthserver/storage/PhabricatorOAuthServerClient.php
··· 30 30 public function getConfiguration() { 31 31 return array( 32 32 self::CONFIG_AUX_PHID => true, 33 + self::CONFIG_COLUMN_SCHEMA => array( 34 + 'name' => 'text255', 35 + 'secret' => 'text32', 36 + 'redirectURI' => 'text255', 37 + ), 38 + self::CONFIG_KEY_SCHEMA => array( 39 + 'key_phid' => null, 40 + 'phid' => array( 41 + 'columns' => array('phid'), 42 + 'unique' => true, 43 + ), 44 + 'creatorPHID' => array( 45 + 'columns' => array('creatorPHID'), 46 + ), 47 + ), 33 48 ) + parent::getConfiguration(); 34 49 } 35 50
+19
src/infrastructure/sms/storage/PhabricatorSMS.php
··· 43 43 ->setProviderSMSID(Filesystem::readRandomCharacters(40)); 44 44 } 45 45 46 + public function getConfiguration() { 47 + return array( 48 + self::CONFIG_COLUMN_SCHEMA => array( 49 + 'providerShortName' => 'text16', 50 + 'providerSMSID' => 'text40', 51 + 'toNumber' => 'text20', 52 + 'fromNumber' => 'text20?', 53 + 'body' => 'text', 54 + 'sendStatus' => 'text16?', 55 + ), 56 + self::CONFIG_KEY_SCHEMA => array( 57 + 'key_provider' => array( 58 + 'columns' => array('providerSMSID', 'providerShortName'), 59 + 'unique' => true, 60 + ), 61 + ), 62 + ) + parent::getConfiguration(); 63 + } 64 + 46 65 public function getTableName() { 47 66 // Slightly non-standard, but otherwise this class needs "MetaMTA" in its 48 67 // name. :/
+22
src/infrastructure/storage/schema/PhabricatorStorageSchemaSpec.php
··· 1 + <?php 2 + 3 + final class PhabricatorStorageSchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildRawSchema( 8 + 'meta_data', 9 + 'patch_status', 10 + array( 11 + 'patch' => 'text255', 12 + 'applied' => 'uint32', 13 + ), 14 + array( 15 + 'PRIMARY' => array( 16 + 'columns' => array('patch'), 17 + 'unique' => true, 18 + ), 19 + )); 20 + } 21 + 22 + }