mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +01:00
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
This commit is contained in:
parent
e9ac3f436a
commit
7499cb24ce
19 changed files with 203 additions and 0 deletions
|
@ -2266,6 +2266,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSlowvotePollController' => 'applications/slowvote/controller/PhabricatorSlowvotePollController.php',
|
'PhabricatorSlowvotePollController' => 'applications/slowvote/controller/PhabricatorSlowvotePollController.php',
|
||||||
'PhabricatorSlowvotePollPHIDType' => 'applications/slowvote/phid/PhabricatorSlowvotePollPHIDType.php',
|
'PhabricatorSlowvotePollPHIDType' => 'applications/slowvote/phid/PhabricatorSlowvotePollPHIDType.php',
|
||||||
'PhabricatorSlowvoteQuery' => 'applications/slowvote/query/PhabricatorSlowvoteQuery.php',
|
'PhabricatorSlowvoteQuery' => 'applications/slowvote/query/PhabricatorSlowvoteQuery.php',
|
||||||
|
'PhabricatorSlowvoteSchemaSpec' => 'applications/slowvote/storage/PhabricatorSlowvoteSchemaSpec.php',
|
||||||
'PhabricatorSlowvoteSearchEngine' => 'applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php',
|
'PhabricatorSlowvoteSearchEngine' => 'applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php',
|
||||||
'PhabricatorSlowvoteTransaction' => 'applications/slowvote/storage/PhabricatorSlowvoteTransaction.php',
|
'PhabricatorSlowvoteTransaction' => 'applications/slowvote/storage/PhabricatorSlowvoteTransaction.php',
|
||||||
'PhabricatorSlowvoteTransactionComment' => 'applications/slowvote/storage/PhabricatorSlowvoteTransactionComment.php',
|
'PhabricatorSlowvoteTransactionComment' => 'applications/slowvote/storage/PhabricatorSlowvoteTransactionComment.php',
|
||||||
|
@ -2322,6 +2323,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSystemRemoveDestroyWorkflow' => 'applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php',
|
'PhabricatorSystemRemoveDestroyWorkflow' => 'applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php',
|
||||||
'PhabricatorSystemRemoveLogWorkflow' => 'applications/system/management/PhabricatorSystemRemoveLogWorkflow.php',
|
'PhabricatorSystemRemoveLogWorkflow' => 'applications/system/management/PhabricatorSystemRemoveLogWorkflow.php',
|
||||||
'PhabricatorSystemRemoveWorkflow' => 'applications/system/management/PhabricatorSystemRemoveWorkflow.php',
|
'PhabricatorSystemRemoveWorkflow' => 'applications/system/management/PhabricatorSystemRemoveWorkflow.php',
|
||||||
|
'PhabricatorSystemSchemaSpec' => 'applications/system/storage/PhabricatorSystemSchemaSpec.php',
|
||||||
'PhabricatorSystemSelectEncodingController' => 'applications/system/controller/PhabricatorSystemSelectEncodingController.php',
|
'PhabricatorSystemSelectEncodingController' => 'applications/system/controller/PhabricatorSystemSelectEncodingController.php',
|
||||||
'PhabricatorSystemSelectHighlightController' => 'applications/system/controller/PhabricatorSystemSelectHighlightController.php',
|
'PhabricatorSystemSelectHighlightController' => 'applications/system/controller/PhabricatorSystemSelectHighlightController.php',
|
||||||
'PhabricatorTaskmasterDaemon' => 'infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php',
|
'PhabricatorTaskmasterDaemon' => 'infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php',
|
||||||
|
@ -2349,6 +2351,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorTokenQuery' => 'applications/tokens/query/PhabricatorTokenQuery.php',
|
'PhabricatorTokenQuery' => 'applications/tokens/query/PhabricatorTokenQuery.php',
|
||||||
'PhabricatorTokenReceiverInterface' => 'applications/tokens/interface/PhabricatorTokenReceiverInterface.php',
|
'PhabricatorTokenReceiverInterface' => 'applications/tokens/interface/PhabricatorTokenReceiverInterface.php',
|
||||||
'PhabricatorTokenReceiverQuery' => 'applications/tokens/query/PhabricatorTokenReceiverQuery.php',
|
'PhabricatorTokenReceiverQuery' => 'applications/tokens/query/PhabricatorTokenReceiverQuery.php',
|
||||||
|
'PhabricatorTokenSchemaSpec' => 'applications/tokens/storage/PhabricatorTokenSchemaSpec.php',
|
||||||
'PhabricatorTokenTokenPHIDType' => 'applications/tokens/phid/PhabricatorTokenTokenPHIDType.php',
|
'PhabricatorTokenTokenPHIDType' => 'applications/tokens/phid/PhabricatorTokenTokenPHIDType.php',
|
||||||
'PhabricatorTokenUIEventListener' => 'applications/tokens/event/PhabricatorTokenUIEventListener.php',
|
'PhabricatorTokenUIEventListener' => 'applications/tokens/event/PhabricatorTokenUIEventListener.php',
|
||||||
'PhabricatorTokensApplication' => 'applications/tokens/application/PhabricatorTokensApplication.php',
|
'PhabricatorTokensApplication' => 'applications/tokens/application/PhabricatorTokensApplication.php',
|
||||||
|
@ -2417,6 +2420,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorWorkerDAO' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerDAO.php',
|
'PhabricatorWorkerDAO' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerDAO.php',
|
||||||
'PhabricatorWorkerLeaseQuery' => 'infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php',
|
'PhabricatorWorkerLeaseQuery' => 'infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php',
|
||||||
'PhabricatorWorkerPermanentFailureException' => 'infrastructure/daemon/workers/exception/PhabricatorWorkerPermanentFailureException.php',
|
'PhabricatorWorkerPermanentFailureException' => 'infrastructure/daemon/workers/exception/PhabricatorWorkerPermanentFailureException.php',
|
||||||
|
'PhabricatorWorkerSchemaSpec' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerSchemaSpec.php',
|
||||||
'PhabricatorWorkerTask' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php',
|
'PhabricatorWorkerTask' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php',
|
||||||
'PhabricatorWorkerTaskData' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerTaskData.php',
|
'PhabricatorWorkerTaskData' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerTaskData.php',
|
||||||
'PhabricatorWorkerTaskDetailController' => 'applications/daemon/controller/PhabricatorWorkerTaskDetailController.php',
|
'PhabricatorWorkerTaskDetailController' => 'applications/daemon/controller/PhabricatorWorkerTaskDetailController.php',
|
||||||
|
@ -2434,6 +2438,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorXHPASTViewPanelController' => 'applications/phpast/controller/PhabricatorXHPASTViewPanelController.php',
|
'PhabricatorXHPASTViewPanelController' => 'applications/phpast/controller/PhabricatorXHPASTViewPanelController.php',
|
||||||
'PhabricatorXHPASTViewParseTree' => 'applications/phpast/storage/PhabricatorXHPASTViewParseTree.php',
|
'PhabricatorXHPASTViewParseTree' => 'applications/phpast/storage/PhabricatorXHPASTViewParseTree.php',
|
||||||
'PhabricatorXHPASTViewRunController' => 'applications/phpast/controller/PhabricatorXHPASTViewRunController.php',
|
'PhabricatorXHPASTViewRunController' => 'applications/phpast/controller/PhabricatorXHPASTViewRunController.php',
|
||||||
|
'PhabricatorXHPASTViewSchemaSpec' => 'applications/phpast/storage/PhabricatorXHPASTViewSchemaSpec.php',
|
||||||
'PhabricatorXHPASTViewStreamController' => 'applications/phpast/controller/PhabricatorXHPASTViewStreamController.php',
|
'PhabricatorXHPASTViewStreamController' => 'applications/phpast/controller/PhabricatorXHPASTViewStreamController.php',
|
||||||
'PhabricatorXHPASTViewTreeController' => 'applications/phpast/controller/PhabricatorXHPASTViewTreeController.php',
|
'PhabricatorXHPASTViewTreeController' => 'applications/phpast/controller/PhabricatorXHPASTViewTreeController.php',
|
||||||
'PhabricatorXHProfApplication' => 'applications/xhprof/application/PhabricatorXHProfApplication.php',
|
'PhabricatorXHProfApplication' => 'applications/xhprof/application/PhabricatorXHProfApplication.php',
|
||||||
|
@ -2445,6 +2450,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorXHProfProfileView' => 'applications/xhprof/view/PhabricatorXHProfProfileView.php',
|
'PhabricatorXHProfProfileView' => 'applications/xhprof/view/PhabricatorXHProfProfileView.php',
|
||||||
'PhabricatorXHProfSample' => 'applications/xhprof/storage/PhabricatorXHProfSample.php',
|
'PhabricatorXHProfSample' => 'applications/xhprof/storage/PhabricatorXHProfSample.php',
|
||||||
'PhabricatorXHProfSampleListController' => 'applications/xhprof/controller/PhabricatorXHProfSampleListController.php',
|
'PhabricatorXHProfSampleListController' => 'applications/xhprof/controller/PhabricatorXHProfSampleListController.php',
|
||||||
|
'PhabricatorXHProfSchemaSpec' => 'applications/xhprof/storage/PhabricatorXHProfSchemaSpec.php',
|
||||||
'PhabricatorYoutubeRemarkupRule' => 'infrastructure/markup/rule/PhabricatorYoutubeRemarkupRule.php',
|
'PhabricatorYoutubeRemarkupRule' => 'infrastructure/markup/rule/PhabricatorYoutubeRemarkupRule.php',
|
||||||
'PhameBasicBlogSkin' => 'applications/phame/skins/PhameBasicBlogSkin.php',
|
'PhameBasicBlogSkin' => 'applications/phame/skins/PhameBasicBlogSkin.php',
|
||||||
'PhameBasicTemplateBlogSkin' => 'applications/phame/skins/PhameBasicTemplateBlogSkin.php',
|
'PhameBasicTemplateBlogSkin' => 'applications/phame/skins/PhameBasicTemplateBlogSkin.php',
|
||||||
|
@ -5239,6 +5245,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSlowvotePollController' => 'PhabricatorSlowvoteController',
|
'PhabricatorSlowvotePollController' => 'PhabricatorSlowvoteController',
|
||||||
'PhabricatorSlowvotePollPHIDType' => 'PhabricatorPHIDType',
|
'PhabricatorSlowvotePollPHIDType' => 'PhabricatorPHIDType',
|
||||||
'PhabricatorSlowvoteQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorSlowvoteQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
|
'PhabricatorSlowvoteSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorSlowvoteSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'PhabricatorSlowvoteSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'PhabricatorSlowvoteTransaction' => 'PhabricatorApplicationTransaction',
|
'PhabricatorSlowvoteTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
'PhabricatorSlowvoteTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
'PhabricatorSlowvoteTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
||||||
|
@ -5287,6 +5294,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSystemRemoveDestroyWorkflow' => 'PhabricatorSystemRemoveWorkflow',
|
'PhabricatorSystemRemoveDestroyWorkflow' => 'PhabricatorSystemRemoveWorkflow',
|
||||||
'PhabricatorSystemRemoveLogWorkflow' => 'PhabricatorSystemRemoveWorkflow',
|
'PhabricatorSystemRemoveLogWorkflow' => 'PhabricatorSystemRemoveWorkflow',
|
||||||
'PhabricatorSystemRemoveWorkflow' => 'PhabricatorManagementWorkflow',
|
'PhabricatorSystemRemoveWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
|
'PhabricatorSystemSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorSystemSelectEncodingController' => 'PhabricatorController',
|
'PhabricatorSystemSelectEncodingController' => 'PhabricatorController',
|
||||||
'PhabricatorSystemSelectHighlightController' => 'PhabricatorController',
|
'PhabricatorSystemSelectHighlightController' => 'PhabricatorController',
|
||||||
'PhabricatorTaskmasterDaemon' => 'PhabricatorDaemon',
|
'PhabricatorTaskmasterDaemon' => 'PhabricatorDaemon',
|
||||||
|
@ -5316,6 +5324,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorTokenLeaderController' => 'PhabricatorTokenController',
|
'PhabricatorTokenLeaderController' => 'PhabricatorTokenController',
|
||||||
'PhabricatorTokenQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorTokenQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'PhabricatorTokenReceiverQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorTokenReceiverQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
|
'PhabricatorTokenSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorTokenTokenPHIDType' => 'PhabricatorPHIDType',
|
'PhabricatorTokenTokenPHIDType' => 'PhabricatorPHIDType',
|
||||||
'PhabricatorTokenUIEventListener' => 'PhabricatorEventListener',
|
'PhabricatorTokenUIEventListener' => 'PhabricatorEventListener',
|
||||||
'PhabricatorTokensApplication' => 'PhabricatorApplication',
|
'PhabricatorTokensApplication' => 'PhabricatorApplication',
|
||||||
|
@ -5391,6 +5400,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorWorkerDAO' => 'PhabricatorLiskDAO',
|
'PhabricatorWorkerDAO' => 'PhabricatorLiskDAO',
|
||||||
'PhabricatorWorkerLeaseQuery' => 'PhabricatorQuery',
|
'PhabricatorWorkerLeaseQuery' => 'PhabricatorQuery',
|
||||||
'PhabricatorWorkerPermanentFailureException' => 'Exception',
|
'PhabricatorWorkerPermanentFailureException' => 'Exception',
|
||||||
|
'PhabricatorWorkerSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorWorkerTask' => 'PhabricatorWorkerDAO',
|
'PhabricatorWorkerTask' => 'PhabricatorWorkerDAO',
|
||||||
'PhabricatorWorkerTaskData' => 'PhabricatorWorkerDAO',
|
'PhabricatorWorkerTaskData' => 'PhabricatorWorkerDAO',
|
||||||
'PhabricatorWorkerTaskDetailController' => 'PhabricatorDaemonController',
|
'PhabricatorWorkerTaskDetailController' => 'PhabricatorDaemonController',
|
||||||
|
@ -5408,6 +5418,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorXHPASTViewPanelController' => 'PhabricatorXHPASTViewController',
|
'PhabricatorXHPASTViewPanelController' => 'PhabricatorXHPASTViewController',
|
||||||
'PhabricatorXHPASTViewParseTree' => 'PhabricatorXHPASTViewDAO',
|
'PhabricatorXHPASTViewParseTree' => 'PhabricatorXHPASTViewDAO',
|
||||||
'PhabricatorXHPASTViewRunController' => 'PhabricatorXHPASTViewController',
|
'PhabricatorXHPASTViewRunController' => 'PhabricatorXHPASTViewController',
|
||||||
|
'PhabricatorXHPASTViewSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorXHPASTViewStreamController' => 'PhabricatorXHPASTViewPanelController',
|
'PhabricatorXHPASTViewStreamController' => 'PhabricatorXHPASTViewPanelController',
|
||||||
'PhabricatorXHPASTViewTreeController' => 'PhabricatorXHPASTViewPanelController',
|
'PhabricatorXHPASTViewTreeController' => 'PhabricatorXHPASTViewPanelController',
|
||||||
'PhabricatorXHProfApplication' => 'PhabricatorApplication',
|
'PhabricatorXHProfApplication' => 'PhabricatorApplication',
|
||||||
|
@ -5419,6 +5430,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorXHProfProfileView' => 'AphrontView',
|
'PhabricatorXHProfProfileView' => 'AphrontView',
|
||||||
'PhabricatorXHProfSample' => 'PhabricatorXHProfDAO',
|
'PhabricatorXHProfSample' => 'PhabricatorXHProfDAO',
|
||||||
'PhabricatorXHProfSampleListController' => 'PhabricatorXHProfController',
|
'PhabricatorXHProfSampleListController' => 'PhabricatorXHProfController',
|
||||||
|
'PhabricatorXHProfSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorYoutubeRemarkupRule' => 'PhutilRemarkupRule',
|
'PhabricatorYoutubeRemarkupRule' => 'PhutilRemarkupRule',
|
||||||
'PhameBasicBlogSkin' => 'PhameBlogSkin',
|
'PhameBasicBlogSkin' => 'PhameBlogSkin',
|
||||||
'PhameBasicTemplateBlogSkin' => 'PhameBasicBlogSkin',
|
'PhameBasicTemplateBlogSkin' => 'PhameBasicBlogSkin',
|
||||||
|
|
|
@ -138,6 +138,21 @@ abstract class PhabricatorConfigSchemaSpec extends Phobject {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function buildCounterSchema(PhabricatorLiskDAO $object) {
|
||||||
|
$this->buildRawSchema(
|
||||||
|
$object->getApplicationName(),
|
||||||
|
PhabricatorLiskDAO::COUNTER_TABLE_NAME,
|
||||||
|
array(
|
||||||
|
'counterName' => 'text32',
|
||||||
|
'counterValue' => 'id64',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'PRIMARY' => array(
|
||||||
|
'columns' => array('counterName'),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
protected function getDatabase($name) {
|
protected function getDatabase($name) {
|
||||||
$server = $this->getServer();
|
$server = $this->getServer();
|
||||||
|
|
||||||
|
@ -274,6 +289,9 @@ abstract class PhabricatorConfigSchemaSpec extends Phobject {
|
||||||
case 'bool':
|
case 'bool':
|
||||||
$column_type = 'tinyint(1)';
|
$column_type = 'tinyint(1)';
|
||||||
break;
|
break;
|
||||||
|
case 'double':
|
||||||
|
$column_type = 'double';
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$column_type = pht('<unknown>');
|
$column_type = pht('<unknown>');
|
||||||
$charset = pht('<unknown>');
|
$charset = pht('<unknown>');
|
||||||
|
|
|
@ -6,4 +6,14 @@ final class PhabricatorXHPASTViewParseTree extends PhabricatorXHPASTViewDAO {
|
||||||
|
|
||||||
protected $input;
|
protected $input;
|
||||||
protected $stdout;
|
protected $stdout;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'authorPHID' => 'phid?',
|
||||||
|
'input' => 'text',
|
||||||
|
'stdout' => 'text',
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorXHPASTViewSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorXHPASTViewDAO');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -5,4 +5,12 @@ final class PhabricatorSlowvoteOption extends PhabricatorSlowvoteDAO {
|
||||||
protected $pollID;
|
protected $pollID;
|
||||||
protected $name;
|
protected $name;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'name' => 'text255',
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,20 @@ final class PhabricatorSlowvotePoll extends PhabricatorSlowvoteDAO
|
||||||
public function getConfiguration() {
|
public function getConfiguration() {
|
||||||
return array(
|
return array(
|
||||||
self::CONFIG_AUX_PHID => true,
|
self::CONFIG_AUX_PHID => true,
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'question' => 'text255',
|
||||||
|
'responseVisibility' => 'uint32',
|
||||||
|
'shuffle' => 'uint32',
|
||||||
|
'method' => 'uint32',
|
||||||
|
'description' => 'text',
|
||||||
|
'isClosed' => 'bool',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_phid' => null,
|
||||||
|
'phid' => array(
|
||||||
|
'columns' => array('phid'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorSlowvoteSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorSlowvoteDAO');
|
||||||
|
$this->buildEdgeSchemata(new PhabricatorSlowvotePoll());
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new PhabricatorSlowvoteTransaction(),
|
||||||
|
new PhabricatorSlowvoteTransactionComment());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -11,6 +11,12 @@ final class PhabricatorSystemActionLog extends PhabricatorSystemDAO {
|
||||||
public function getConfiguration() {
|
public function getConfiguration() {
|
||||||
return array(
|
return array(
|
||||||
self::CONFIG_TIMESTAMPS => false,
|
self::CONFIG_TIMESTAMPS => false,
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'actorHash' => 'bytes12',
|
||||||
|
'actorIdentity' => 'text255',
|
||||||
|
'action' => 'text32',
|
||||||
|
'score' => 'double',
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,12 @@ final class PhabricatorSystemDestructionLog extends PhabricatorSystemDAO {
|
||||||
public function getConfiguration() {
|
public function getConfiguration() {
|
||||||
return array(
|
return array(
|
||||||
self::CONFIG_TIMESTAMPS => false,
|
self::CONFIG_TIMESTAMPS => false,
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'objectClass' => 'text128',
|
||||||
|
'rootLogID' => 'id?',
|
||||||
|
'objectPHID' => 'phid?',
|
||||||
|
'objectMonogram' => 'text64?',
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorSystemSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorSystemDAO');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -9,6 +9,14 @@ final class PhabricatorTokenCount extends PhabricatorTokenDAO {
|
||||||
return array(
|
return array(
|
||||||
self::CONFIG_IDS => self::IDS_MANUAL,
|
self::CONFIG_IDS => self::IDS_MANUAL,
|
||||||
self::CONFIG_TIMESTAMPS => false,
|
self::CONFIG_TIMESTAMPS => false,
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'tokenCount' => 'uint32',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_objectPHID' => array(
|
||||||
|
'columns' => array('objectPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,16 @@ final class PhabricatorTokenGiven extends PhabricatorTokenDAO
|
||||||
|
|
||||||
private $object = self::ATTACHABLE;
|
private $object = self::ATTACHABLE;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_all' => array(
|
||||||
|
'columns' => array('objectPHID', 'authorPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
public function attachObject(PhabricatorTokenReceiverInterface $object) {
|
public function attachObject(PhabricatorTokenReceiverInterface $object) {
|
||||||
$this->object = $object;
|
$this->object = $object;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorTokenSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorTokenDAO');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -9,4 +9,23 @@ final class PhabricatorXHProfSample extends PhabricatorXHProfDAO {
|
||||||
protected $requestPath;
|
protected $requestPath;
|
||||||
protected $controller;
|
protected $controller;
|
||||||
protected $userPHID;
|
protected $userPHID;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'sampleRate' => 'uint32',
|
||||||
|
'usTotal' => 'uint64',
|
||||||
|
'hostname' => 'text255?',
|
||||||
|
'requestPath' => 'text255?',
|
||||||
|
'controller' => 'text255?',
|
||||||
|
'userPHID' => 'phid?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'filePHID' => array(
|
||||||
|
'columns' => array('filePHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorXHProfSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorXHProfDAO');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -11,6 +11,11 @@ final class PhabricatorWorkerActiveTask extends PhabricatorWorkerTask {
|
||||||
return array(
|
return array(
|
||||||
self::CONFIG_IDS => self::IDS_COUNTER,
|
self::CONFIG_IDS => self::IDS_COUNTER,
|
||||||
self::CONFIG_TIMESTAMPS => false,
|
self::CONFIG_TIMESTAMPS => false,
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'dataID' => array(
|
||||||
|
'columns' => array('dataID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,15 @@ final class PhabricatorWorkerArchiveTask extends PhabricatorWorkerTask {
|
||||||
protected $duration;
|
protected $duration;
|
||||||
protected $result;
|
protected $result;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
$config = parent::getConfiguration();
|
||||||
|
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
||||||
|
'result' => 'uint32',
|
||||||
|
'duration' => 'uint64',
|
||||||
|
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
public function save() {
|
public function save() {
|
||||||
if ($this->getID() === null) {
|
if ($this->getID() === null) {
|
||||||
throw new Exception('Trying to archive a task with no ID.');
|
throw new Exception('Trying to archive a task with no ID.');
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorWorkerSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorWorkerDAO');
|
||||||
|
$this->buildCounterSchema(new PhabricatorWorkerActiveTask());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,6 +14,19 @@ abstract class PhabricatorWorkerTask extends PhabricatorWorkerDAO {
|
||||||
private $data;
|
private $data;
|
||||||
private $executionException;
|
private $executionException;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'taskClass' => 'text255',
|
||||||
|
'leaseOwner' => 'text255?',
|
||||||
|
'leaseExpires' => 'epoch?',
|
||||||
|
'failureCount' => 'uint32',
|
||||||
|
'failureTime' => 'epoch?',
|
||||||
|
'priority' => 'uint32',
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
final public function setExecutionException(Exception $execution_exception) {
|
final public function setExecutionException(Exception $execution_exception) {
|
||||||
$this->executionException = $execution_exception;
|
$this->executionException = $execution_exception;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
Loading…
Reference in a new issue