@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 Workers, XHProf, PHPAAST, Tokens, System, Slowvote

Summary: T1191. Nothing very notable here.

Test Plan: Saw more blue in web UI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

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

+203
+12
src/__phutil_library_map__.php
··· 2266 2266 'PhabricatorSlowvotePollController' => 'applications/slowvote/controller/PhabricatorSlowvotePollController.php', 2267 2267 'PhabricatorSlowvotePollPHIDType' => 'applications/slowvote/phid/PhabricatorSlowvotePollPHIDType.php', 2268 2268 'PhabricatorSlowvoteQuery' => 'applications/slowvote/query/PhabricatorSlowvoteQuery.php', 2269 + 'PhabricatorSlowvoteSchemaSpec' => 'applications/slowvote/storage/PhabricatorSlowvoteSchemaSpec.php', 2269 2270 'PhabricatorSlowvoteSearchEngine' => 'applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php', 2270 2271 'PhabricatorSlowvoteTransaction' => 'applications/slowvote/storage/PhabricatorSlowvoteTransaction.php', 2271 2272 'PhabricatorSlowvoteTransactionComment' => 'applications/slowvote/storage/PhabricatorSlowvoteTransactionComment.php', ··· 2322 2323 'PhabricatorSystemRemoveDestroyWorkflow' => 'applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php', 2323 2324 'PhabricatorSystemRemoveLogWorkflow' => 'applications/system/management/PhabricatorSystemRemoveLogWorkflow.php', 2324 2325 'PhabricatorSystemRemoveWorkflow' => 'applications/system/management/PhabricatorSystemRemoveWorkflow.php', 2326 + 'PhabricatorSystemSchemaSpec' => 'applications/system/storage/PhabricatorSystemSchemaSpec.php', 2325 2327 'PhabricatorSystemSelectEncodingController' => 'applications/system/controller/PhabricatorSystemSelectEncodingController.php', 2326 2328 'PhabricatorSystemSelectHighlightController' => 'applications/system/controller/PhabricatorSystemSelectHighlightController.php', 2327 2329 'PhabricatorTaskmasterDaemon' => 'infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php', ··· 2349 2351 'PhabricatorTokenQuery' => 'applications/tokens/query/PhabricatorTokenQuery.php', 2350 2352 'PhabricatorTokenReceiverInterface' => 'applications/tokens/interface/PhabricatorTokenReceiverInterface.php', 2351 2353 'PhabricatorTokenReceiverQuery' => 'applications/tokens/query/PhabricatorTokenReceiverQuery.php', 2354 + 'PhabricatorTokenSchemaSpec' => 'applications/tokens/storage/PhabricatorTokenSchemaSpec.php', 2352 2355 'PhabricatorTokenTokenPHIDType' => 'applications/tokens/phid/PhabricatorTokenTokenPHIDType.php', 2353 2356 'PhabricatorTokenUIEventListener' => 'applications/tokens/event/PhabricatorTokenUIEventListener.php', 2354 2357 'PhabricatorTokensApplication' => 'applications/tokens/application/PhabricatorTokensApplication.php', ··· 2417 2420 'PhabricatorWorkerDAO' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerDAO.php', 2418 2421 'PhabricatorWorkerLeaseQuery' => 'infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php', 2419 2422 'PhabricatorWorkerPermanentFailureException' => 'infrastructure/daemon/workers/exception/PhabricatorWorkerPermanentFailureException.php', 2423 + 'PhabricatorWorkerSchemaSpec' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerSchemaSpec.php', 2420 2424 'PhabricatorWorkerTask' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php', 2421 2425 'PhabricatorWorkerTaskData' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerTaskData.php', 2422 2426 'PhabricatorWorkerTaskDetailController' => 'applications/daemon/controller/PhabricatorWorkerTaskDetailController.php', ··· 2434 2438 'PhabricatorXHPASTViewPanelController' => 'applications/phpast/controller/PhabricatorXHPASTViewPanelController.php', 2435 2439 'PhabricatorXHPASTViewParseTree' => 'applications/phpast/storage/PhabricatorXHPASTViewParseTree.php', 2436 2440 'PhabricatorXHPASTViewRunController' => 'applications/phpast/controller/PhabricatorXHPASTViewRunController.php', 2441 + 'PhabricatorXHPASTViewSchemaSpec' => 'applications/phpast/storage/PhabricatorXHPASTViewSchemaSpec.php', 2437 2442 'PhabricatorXHPASTViewStreamController' => 'applications/phpast/controller/PhabricatorXHPASTViewStreamController.php', 2438 2443 'PhabricatorXHPASTViewTreeController' => 'applications/phpast/controller/PhabricatorXHPASTViewTreeController.php', 2439 2444 'PhabricatorXHProfApplication' => 'applications/xhprof/application/PhabricatorXHProfApplication.php', ··· 2445 2450 'PhabricatorXHProfProfileView' => 'applications/xhprof/view/PhabricatorXHProfProfileView.php', 2446 2451 'PhabricatorXHProfSample' => 'applications/xhprof/storage/PhabricatorXHProfSample.php', 2447 2452 'PhabricatorXHProfSampleListController' => 'applications/xhprof/controller/PhabricatorXHProfSampleListController.php', 2453 + 'PhabricatorXHProfSchemaSpec' => 'applications/xhprof/storage/PhabricatorXHProfSchemaSpec.php', 2448 2454 'PhabricatorYoutubeRemarkupRule' => 'infrastructure/markup/rule/PhabricatorYoutubeRemarkupRule.php', 2449 2455 'PhameBasicBlogSkin' => 'applications/phame/skins/PhameBasicBlogSkin.php', 2450 2456 'PhameBasicTemplateBlogSkin' => 'applications/phame/skins/PhameBasicTemplateBlogSkin.php', ··· 5239 5245 'PhabricatorSlowvotePollController' => 'PhabricatorSlowvoteController', 5240 5246 'PhabricatorSlowvotePollPHIDType' => 'PhabricatorPHIDType', 5241 5247 'PhabricatorSlowvoteQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 5248 + 'PhabricatorSlowvoteSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5242 5249 'PhabricatorSlowvoteSearchEngine' => 'PhabricatorApplicationSearchEngine', 5243 5250 'PhabricatorSlowvoteTransaction' => 'PhabricatorApplicationTransaction', 5244 5251 'PhabricatorSlowvoteTransactionComment' => 'PhabricatorApplicationTransactionComment', ··· 5287 5294 'PhabricatorSystemRemoveDestroyWorkflow' => 'PhabricatorSystemRemoveWorkflow', 5288 5295 'PhabricatorSystemRemoveLogWorkflow' => 'PhabricatorSystemRemoveWorkflow', 5289 5296 'PhabricatorSystemRemoveWorkflow' => 'PhabricatorManagementWorkflow', 5297 + 'PhabricatorSystemSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5290 5298 'PhabricatorSystemSelectEncodingController' => 'PhabricatorController', 5291 5299 'PhabricatorSystemSelectHighlightController' => 'PhabricatorController', 5292 5300 'PhabricatorTaskmasterDaemon' => 'PhabricatorDaemon', ··· 5316 5324 'PhabricatorTokenLeaderController' => 'PhabricatorTokenController', 5317 5325 'PhabricatorTokenQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 5318 5326 'PhabricatorTokenReceiverQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 5327 + 'PhabricatorTokenSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5319 5328 'PhabricatorTokenTokenPHIDType' => 'PhabricatorPHIDType', 5320 5329 'PhabricatorTokenUIEventListener' => 'PhabricatorEventListener', 5321 5330 'PhabricatorTokensApplication' => 'PhabricatorApplication', ··· 5391 5400 'PhabricatorWorkerDAO' => 'PhabricatorLiskDAO', 5392 5401 'PhabricatorWorkerLeaseQuery' => 'PhabricatorQuery', 5393 5402 'PhabricatorWorkerPermanentFailureException' => 'Exception', 5403 + 'PhabricatorWorkerSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5394 5404 'PhabricatorWorkerTask' => 'PhabricatorWorkerDAO', 5395 5405 'PhabricatorWorkerTaskData' => 'PhabricatorWorkerDAO', 5396 5406 'PhabricatorWorkerTaskDetailController' => 'PhabricatorDaemonController', ··· 5408 5418 'PhabricatorXHPASTViewPanelController' => 'PhabricatorXHPASTViewController', 5409 5419 'PhabricatorXHPASTViewParseTree' => 'PhabricatorXHPASTViewDAO', 5410 5420 'PhabricatorXHPASTViewRunController' => 'PhabricatorXHPASTViewController', 5421 + 'PhabricatorXHPASTViewSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5411 5422 'PhabricatorXHPASTViewStreamController' => 'PhabricatorXHPASTViewPanelController', 5412 5423 'PhabricatorXHPASTViewTreeController' => 'PhabricatorXHPASTViewPanelController', 5413 5424 'PhabricatorXHProfApplication' => 'PhabricatorApplication', ··· 5419 5430 'PhabricatorXHProfProfileView' => 'AphrontView', 5420 5431 'PhabricatorXHProfSample' => 'PhabricatorXHProfDAO', 5421 5432 'PhabricatorXHProfSampleListController' => 'PhabricatorXHProfController', 5433 + 'PhabricatorXHProfSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5422 5434 'PhabricatorYoutubeRemarkupRule' => 'PhutilRemarkupRule', 5423 5435 'PhameBasicBlogSkin' => 'PhameBlogSkin', 5424 5436 'PhameBasicTemplateBlogSkin' => 'PhameBasicBlogSkin',
+18
src/applications/config/schema/PhabricatorConfigSchemaSpec.php
··· 138 138 )); 139 139 } 140 140 141 + public function buildCounterSchema(PhabricatorLiskDAO $object) { 142 + $this->buildRawSchema( 143 + $object->getApplicationName(), 144 + PhabricatorLiskDAO::COUNTER_TABLE_NAME, 145 + array( 146 + 'counterName' => 'text32', 147 + 'counterValue' => 'id64', 148 + ), 149 + array( 150 + 'PRIMARY' => array( 151 + 'columns' => array('counterName'), 152 + ), 153 + )); 154 + } 155 + 141 156 protected function getDatabase($name) { 142 157 $server = $this->getServer(); 143 158 ··· 273 288 break; 274 289 case 'bool': 275 290 $column_type = 'tinyint(1)'; 291 + break; 292 + case 'double': 293 + $column_type = 'double'; 276 294 break; 277 295 default: 278 296 $column_type = pht('<unknown>');
+10
src/applications/phpast/storage/PhabricatorXHPASTViewParseTree.php
··· 6 6 7 7 protected $input; 8 8 protected $stdout; 9 + 10 + public function getConfiguration() { 11 + return array( 12 + self::CONFIG_COLUMN_SCHEMA => array( 13 + 'authorPHID' => 'phid?', 14 + 'input' => 'text', 15 + 'stdout' => 'text', 16 + ), 17 + ) + parent::getConfiguration(); 18 + } 9 19 }
+10
src/applications/phpast/storage/PhabricatorXHPASTViewSchemaSpec.php
··· 1 + <?php 2 + 3 + final class PhabricatorXHPASTViewSchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildLiskSchemata('PhabricatorXHPASTViewDAO'); 8 + } 9 + 10 + }
+8
src/applications/slowvote/storage/PhabricatorSlowvoteOption.php
··· 5 5 protected $pollID; 6 6 protected $name; 7 7 8 + public function getConfiguration() { 9 + return array( 10 + self::CONFIG_COLUMN_SCHEMA => array( 11 + 'name' => 'text255', 12 + ), 13 + ) + parent::getConfiguration(); 14 + } 15 + 8 16 }
+14
src/applications/slowvote/storage/PhabricatorSlowvotePoll.php
··· 46 46 public function getConfiguration() { 47 47 return array( 48 48 self::CONFIG_AUX_PHID => true, 49 + self::CONFIG_COLUMN_SCHEMA => array( 50 + 'question' => 'text255', 51 + 'responseVisibility' => 'uint32', 52 + 'shuffle' => 'uint32', 53 + 'method' => 'uint32', 54 + 'description' => 'text', 55 + 'isClosed' => 'bool', 56 + ), 57 + self::CONFIG_KEY_SCHEMA => array( 58 + 'key_phid' => null, 59 + 'phid' => array( 60 + 'columns' => array('phid'), 61 + ), 62 + ), 49 63 ) + parent::getConfiguration(); 50 64 } 51 65
+14
src/applications/slowvote/storage/PhabricatorSlowvoteSchemaSpec.php
··· 1 + <?php 2 + 3 + final class PhabricatorSlowvoteSchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildLiskSchemata('PhabricatorSlowvoteDAO'); 8 + $this->buildEdgeSchemata(new PhabricatorSlowvotePoll()); 9 + $this->buildTransactionSchema( 10 + new PhabricatorSlowvoteTransaction(), 11 + new PhabricatorSlowvoteTransactionComment()); 12 + } 13 + 14 + }
+6
src/applications/system/storage/PhabricatorSystemActionLog.php
··· 11 11 public function getConfiguration() { 12 12 return array( 13 13 self::CONFIG_TIMESTAMPS => false, 14 + self::CONFIG_COLUMN_SCHEMA => array( 15 + 'actorHash' => 'bytes12', 16 + 'actorIdentity' => 'text255', 17 + 'action' => 'text32', 18 + 'score' => 'double', 19 + ), 14 20 ) + parent::getConfiguration(); 15 21 } 16 22
+6
src/applications/system/storage/PhabricatorSystemDestructionLog.php
··· 11 11 public function getConfiguration() { 12 12 return array( 13 13 self::CONFIG_TIMESTAMPS => false, 14 + self::CONFIG_COLUMN_SCHEMA => array( 15 + 'objectClass' => 'text128', 16 + 'rootLogID' => 'id?', 17 + 'objectPHID' => 'phid?', 18 + 'objectMonogram' => 'text64?', 19 + ), 14 20 ) + parent::getConfiguration(); 15 21 } 16 22
+10
src/applications/system/storage/PhabricatorSystemSchemaSpec.php
··· 1 + <?php 2 + 3 + final class PhabricatorSystemSchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildLiskSchemata('PhabricatorSystemDAO'); 8 + } 9 + 10 + }
+8
src/applications/tokens/storage/PhabricatorTokenCount.php
··· 9 9 return array( 10 10 self::CONFIG_IDS => self::IDS_MANUAL, 11 11 self::CONFIG_TIMESTAMPS => false, 12 + self::CONFIG_COLUMN_SCHEMA => array( 13 + 'tokenCount' => 'uint32', 14 + ), 15 + self::CONFIG_KEY_SCHEMA => array( 16 + 'key_objectPHID' => array( 17 + 'columns' => array('objectPHID'), 18 + ), 19 + ), 12 20 ) + parent::getConfiguration(); 13 21 } 14 22
+10
src/applications/tokens/storage/PhabricatorTokenGiven.php
··· 9 9 10 10 private $object = self::ATTACHABLE; 11 11 12 + public function getConfiguration() { 13 + return array( 14 + self::CONFIG_KEY_SCHEMA => array( 15 + 'key_all' => array( 16 + 'columns' => array('objectPHID', 'authorPHID'), 17 + ), 18 + ), 19 + ) + parent::getConfiguration(); 20 + } 21 + 12 22 public function attachObject(PhabricatorTokenReceiverInterface $object) { 13 23 $this->object = $object; 14 24 return $this;
+10
src/applications/tokens/storage/PhabricatorTokenSchemaSpec.php
··· 1 + <?php 2 + 3 + final class PhabricatorTokenSchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildLiskSchemata('PhabricatorTokenDAO'); 8 + } 9 + 10 + }
+19
src/applications/xhprof/storage/PhabricatorXHProfSample.php
··· 9 9 protected $requestPath; 10 10 protected $controller; 11 11 protected $userPHID; 12 + 13 + public function getConfiguration() { 14 + return array( 15 + self::CONFIG_COLUMN_SCHEMA => array( 16 + 'sampleRate' => 'uint32', 17 + 'usTotal' => 'uint64', 18 + 'hostname' => 'text255?', 19 + 'requestPath' => 'text255?', 20 + 'controller' => 'text255?', 21 + 'userPHID' => 'phid?', 22 + ), 23 + self::CONFIG_KEY_SCHEMA => array( 24 + 'filePHID' => array( 25 + 'columns' => array('filePHID'), 26 + ), 27 + ), 28 + ) + parent::getConfiguration(); 29 + } 30 + 12 31 }
+10
src/applications/xhprof/storage/PhabricatorXHProfSchemaSpec.php
··· 1 + <?php 2 + 3 + final class PhabricatorXHProfSchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildLiskSchemata('PhabricatorXHProfDAO'); 8 + } 9 + 10 + }
+5
src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
··· 11 11 return array( 12 12 self::CONFIG_IDS => self::IDS_COUNTER, 13 13 self::CONFIG_TIMESTAMPS => false, 14 + self::CONFIG_KEY_SCHEMA => array( 15 + 'dataID' => array( 16 + 'columns' => array('dataID'), 17 + ), 18 + ), 14 19 ) + parent::getConfiguration(); 15 20 } 16 21
+9
src/infrastructure/daemon/workers/storage/PhabricatorWorkerArchiveTask.php
··· 9 9 protected $duration; 10 10 protected $result; 11 11 12 + public function getConfiguration() { 13 + $config = parent::getConfiguration(); 14 + $config[self::CONFIG_COLUMN_SCHEMA] = array( 15 + 'result' => 'uint32', 16 + 'duration' => 'uint64', 17 + ) + $config[self::CONFIG_COLUMN_SCHEMA]; 18 + return $config; 19 + } 20 + 12 21 public function save() { 13 22 if ($this->getID() === null) { 14 23 throw new Exception('Trying to archive a task with no ID.');
+11
src/infrastructure/daemon/workers/storage/PhabricatorWorkerSchemaSpec.php
··· 1 + <?php 2 + 3 + final class PhabricatorWorkerSchemaSpec 4 + extends PhabricatorConfigSchemaSpec { 5 + 6 + public function buildSchemata() { 7 + $this->buildLiskSchemata('PhabricatorWorkerDAO'); 8 + $this->buildCounterSchema(new PhabricatorWorkerActiveTask()); 9 + } 10 + 11 + }
+13
src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
··· 14 14 private $data; 15 15 private $executionException; 16 16 17 + public function getConfiguration() { 18 + return array( 19 + self::CONFIG_COLUMN_SCHEMA => array( 20 + 'taskClass' => 'text255', 21 + 'leaseOwner' => 'text255?', 22 + 'leaseExpires' => 'epoch?', 23 + 'failureCount' => 'uint32', 24 + 'failureTime' => 'epoch?', 25 + 'priority' => 'uint32', 26 + ), 27 + ) + parent::getConfiguration(); 28 + } 29 + 17 30 final public function setExecutionException(Exception $execution_exception) { 18 31 $this->executionException = $execution_exception; 19 32 return $this;