mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-18 02:31:10 +01:00
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
This commit is contained in:
parent
cd4e3c6399
commit
d6639b68d5
18 changed files with 273 additions and 0 deletions
|
@ -992,6 +992,7 @@ phutil_register_library_map(array(
|
||||||
'NuanceRequestorTransactionComment' => 'applications/nuance/storage/NuanceRequestorTransactionComment.php',
|
'NuanceRequestorTransactionComment' => 'applications/nuance/storage/NuanceRequestorTransactionComment.php',
|
||||||
'NuanceRequestorTransactionQuery' => 'applications/nuance/query/NuanceRequestorTransactionQuery.php',
|
'NuanceRequestorTransactionQuery' => 'applications/nuance/query/NuanceRequestorTransactionQuery.php',
|
||||||
'NuanceRequestorViewController' => 'applications/nuance/controller/NuanceRequestorViewController.php',
|
'NuanceRequestorViewController' => 'applications/nuance/controller/NuanceRequestorViewController.php',
|
||||||
|
'NuanceSchemaSpec' => 'applications/nuance/storage/NuanceSchemaSpec.php',
|
||||||
'NuanceSource' => 'applications/nuance/storage/NuanceSource.php',
|
'NuanceSource' => 'applications/nuance/storage/NuanceSource.php',
|
||||||
'NuanceSourceDefaultEditCapability' => 'applications/nuance/capability/NuanceSourceDefaultEditCapability.php',
|
'NuanceSourceDefaultEditCapability' => 'applications/nuance/capability/NuanceSourceDefaultEditCapability.php',
|
||||||
'NuanceSourceDefaultViewCapability' => 'applications/nuance/capability/NuanceSourceDefaultViewCapability.php',
|
'NuanceSourceDefaultViewCapability' => 'applications/nuance/capability/NuanceSourceDefaultViewCapability.php',
|
||||||
|
@ -1808,6 +1809,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorMetaMTAReceivedMail' => 'applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php',
|
'PhabricatorMetaMTAReceivedMail' => 'applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php',
|
||||||
'PhabricatorMetaMTAReceivedMailProcessingException' => 'applications/metamta/exception/PhabricatorMetaMTAReceivedMailProcessingException.php',
|
'PhabricatorMetaMTAReceivedMailProcessingException' => 'applications/metamta/exception/PhabricatorMetaMTAReceivedMailProcessingException.php',
|
||||||
'PhabricatorMetaMTAReceivedMailTestCase' => 'applications/metamta/storage/__tests__/PhabricatorMetaMTAReceivedMailTestCase.php',
|
'PhabricatorMetaMTAReceivedMailTestCase' => 'applications/metamta/storage/__tests__/PhabricatorMetaMTAReceivedMailTestCase.php',
|
||||||
|
'PhabricatorMetaMTASchemaSpec' => 'applications/metamta/storage/PhabricatorMetaMTASchemaSpec.php',
|
||||||
'PhabricatorMetaMTASendGridReceiveController' => 'applications/metamta/controller/PhabricatorMetaMTASendGridReceiveController.php',
|
'PhabricatorMetaMTASendGridReceiveController' => 'applications/metamta/controller/PhabricatorMetaMTASendGridReceiveController.php',
|
||||||
'PhabricatorMetaMTAWorker' => 'applications/metamta/PhabricatorMetaMTAWorker.php',
|
'PhabricatorMetaMTAWorker' => 'applications/metamta/PhabricatorMetaMTAWorker.php',
|
||||||
'PhabricatorMultiColumnExample' => 'applications/uiexample/examples/PhabricatorMultiColumnExample.php',
|
'PhabricatorMultiColumnExample' => 'applications/uiexample/examples/PhabricatorMultiColumnExample.php',
|
||||||
|
@ -1844,6 +1846,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorOAuthClientListController' => 'applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php',
|
'PhabricatorOAuthClientListController' => 'applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php',
|
||||||
'PhabricatorOAuthClientViewController' => 'applications/oauthserver/controller/client/PhabricatorOAuthClientViewController.php',
|
'PhabricatorOAuthClientViewController' => 'applications/oauthserver/controller/client/PhabricatorOAuthClientViewController.php',
|
||||||
'PhabricatorOAuthResponse' => 'applications/oauthserver/PhabricatorOAuthResponse.php',
|
'PhabricatorOAuthResponse' => 'applications/oauthserver/PhabricatorOAuthResponse.php',
|
||||||
|
'PhabricatorOAuthSchemaSpec' => 'applications/oauthserver/storage/PhabricatorOAuthSchemaSpec.php',
|
||||||
'PhabricatorOAuthServer' => 'applications/oauthserver/PhabricatorOAuthServer.php',
|
'PhabricatorOAuthServer' => 'applications/oauthserver/PhabricatorOAuthServer.php',
|
||||||
'PhabricatorOAuthServerAccessToken' => 'applications/oauthserver/storage/PhabricatorOAuthServerAccessToken.php',
|
'PhabricatorOAuthServerAccessToken' => 'applications/oauthserver/storage/PhabricatorOAuthServerAccessToken.php',
|
||||||
'PhabricatorOAuthServerApplication' => 'applications/oauthserver/application/PhabricatorOAuthServerApplication.php',
|
'PhabricatorOAuthServerApplication' => 'applications/oauthserver/application/PhabricatorOAuthServerApplication.php',
|
||||||
|
@ -2305,6 +2308,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorStorageManagementUpgradeWorkflow' => 'infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php',
|
'PhabricatorStorageManagementUpgradeWorkflow' => 'infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php',
|
||||||
'PhabricatorStorageManagementWorkflow' => 'infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php',
|
'PhabricatorStorageManagementWorkflow' => 'infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php',
|
||||||
'PhabricatorStoragePatch' => 'infrastructure/storage/management/PhabricatorStoragePatch.php',
|
'PhabricatorStoragePatch' => 'infrastructure/storage/management/PhabricatorStoragePatch.php',
|
||||||
|
'PhabricatorStorageSchemaSpec' => 'infrastructure/storage/schema/PhabricatorStorageSchemaSpec.php',
|
||||||
'PhabricatorSubscribableInterface' => 'applications/subscriptions/interface/PhabricatorSubscribableInterface.php',
|
'PhabricatorSubscribableInterface' => 'applications/subscriptions/interface/PhabricatorSubscribableInterface.php',
|
||||||
'PhabricatorSubscribersQuery' => 'applications/subscriptions/query/PhabricatorSubscribersQuery.php',
|
'PhabricatorSubscribersQuery' => 'applications/subscriptions/query/PhabricatorSubscribersQuery.php',
|
||||||
'PhabricatorSubscriptionsApplication' => 'applications/subscriptions/application/PhabricatorSubscriptionsApplication.php',
|
'PhabricatorSubscriptionsApplication' => 'applications/subscriptions/application/PhabricatorSubscriptionsApplication.php',
|
||||||
|
@ -3892,6 +3896,7 @@ phutil_register_library_map(array(
|
||||||
'NuanceRequestorTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
'NuanceRequestorTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
||||||
'NuanceRequestorTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
'NuanceRequestorTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
'NuanceRequestorViewController' => 'NuanceController',
|
'NuanceRequestorViewController' => 'NuanceController',
|
||||||
|
'NuanceSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'NuanceSource' => array(
|
'NuanceSource' => array(
|
||||||
'NuanceDAO',
|
'NuanceDAO',
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
|
@ -4738,6 +4743,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorMetaMTAReceivedMail' => 'PhabricatorMetaMTADAO',
|
'PhabricatorMetaMTAReceivedMail' => 'PhabricatorMetaMTADAO',
|
||||||
'PhabricatorMetaMTAReceivedMailProcessingException' => 'Exception',
|
'PhabricatorMetaMTAReceivedMailProcessingException' => 'Exception',
|
||||||
'PhabricatorMetaMTAReceivedMailTestCase' => 'PhabricatorTestCase',
|
'PhabricatorMetaMTAReceivedMailTestCase' => 'PhabricatorTestCase',
|
||||||
|
'PhabricatorMetaMTASchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorMetaMTASendGridReceiveController' => 'PhabricatorMetaMTAController',
|
'PhabricatorMetaMTASendGridReceiveController' => 'PhabricatorMetaMTAController',
|
||||||
'PhabricatorMetaMTAWorker' => 'PhabricatorWorker',
|
'PhabricatorMetaMTAWorker' => 'PhabricatorWorker',
|
||||||
'PhabricatorMultiColumnExample' => 'PhabricatorUIExample',
|
'PhabricatorMultiColumnExample' => 'PhabricatorUIExample',
|
||||||
|
@ -4778,6 +4784,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorOAuthClientListController' => 'PhabricatorOAuthClientController',
|
'PhabricatorOAuthClientListController' => 'PhabricatorOAuthClientController',
|
||||||
'PhabricatorOAuthClientViewController' => 'PhabricatorOAuthClientController',
|
'PhabricatorOAuthClientViewController' => 'PhabricatorOAuthClientController',
|
||||||
'PhabricatorOAuthResponse' => 'AphrontResponse',
|
'PhabricatorOAuthResponse' => 'AphrontResponse',
|
||||||
|
'PhabricatorOAuthSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorOAuthServerAccessToken' => 'PhabricatorOAuthServerDAO',
|
'PhabricatorOAuthServerAccessToken' => 'PhabricatorOAuthServerDAO',
|
||||||
'PhabricatorOAuthServerApplication' => 'PhabricatorApplication',
|
'PhabricatorOAuthServerApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorOAuthServerAuthController' => 'PhabricatorAuthController',
|
'PhabricatorOAuthServerAuthController' => 'PhabricatorAuthController',
|
||||||
|
@ -5283,6 +5290,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorStorageManagementStatusWorkflow' => 'PhabricatorStorageManagementWorkflow',
|
'PhabricatorStorageManagementStatusWorkflow' => 'PhabricatorStorageManagementWorkflow',
|
||||||
'PhabricatorStorageManagementUpgradeWorkflow' => 'PhabricatorStorageManagementWorkflow',
|
'PhabricatorStorageManagementUpgradeWorkflow' => 'PhabricatorStorageManagementWorkflow',
|
||||||
'PhabricatorStorageManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
'PhabricatorStorageManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
|
'PhabricatorStorageSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorSubscribersQuery' => 'PhabricatorQuery',
|
'PhabricatorSubscribersQuery' => 'PhabricatorQuery',
|
||||||
'PhabricatorSubscriptionsApplication' => 'PhabricatorApplication',
|
'PhabricatorSubscriptionsApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorSubscriptionsEditController' => 'PhabricatorController',
|
'PhabricatorSubscriptionsEditController' => 'PhabricatorController',
|
||||||
|
|
|
@ -271,6 +271,11 @@ abstract class PhabricatorConfigSchemaSpec extends Phobject {
|
||||||
$charset = $this->getUTF8Charset();
|
$charset = $this->getUTF8Charset();
|
||||||
$collation = $this->getUTF8Collation();
|
$collation = $this->getUTF8Collation();
|
||||||
break;
|
break;
|
||||||
|
case 'text40':
|
||||||
|
$column_type = 'varchar(40)';
|
||||||
|
$charset = $this->getUTF8Charset();
|
||||||
|
$collation = $this->getUTF8Collation();
|
||||||
|
break;
|
||||||
case 'text32':
|
case 'text32':
|
||||||
$column_type = 'varchar(32)';
|
$column_type = 'varchar(32)';
|
||||||
$charset = $this->getUTF8Charset();
|
$charset = $this->getUTF8Charset();
|
||||||
|
|
|
@ -17,6 +17,26 @@ final class PhabricatorMetaMTAMailingList extends PhabricatorMetaMTADAO
|
||||||
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(
|
||||||
|
'name' => 'text255',
|
||||||
|
'email' => 'text255',
|
||||||
|
'uri' => 'text255?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_phid' => null,
|
||||||
|
'phid' => array(
|
||||||
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'email' => array(
|
||||||
|
'columns' => array('email'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'name' => array(
|
||||||
|
'columns' => array('name'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,22 @@ final class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'parameters' => self::SERIALIZATION_JSON,
|
'parameters' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'status' => 'text255',
|
||||||
|
'message' => 'text',
|
||||||
|
'relatedPHID' => 'phid?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'status' => array(
|
||||||
|
'columns' => array('status'),
|
||||||
|
),
|
||||||
|
'relatedPHID' => array(
|
||||||
|
'columns' => array('relatedPHID'),
|
||||||
|
),
|
||||||
|
'key_created' => array(
|
||||||
|
'columns' => array('dateCreated'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,27 @@ final class PhabricatorMetaMTAReceivedMail extends PhabricatorMetaMTADAO {
|
||||||
'bodies' => self::SERIALIZATION_JSON,
|
'bodies' => self::SERIALIZATION_JSON,
|
||||||
'attachments' => self::SERIALIZATION_JSON,
|
'attachments' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'relatedPHID' => 'phid?',
|
||||||
|
'authorPHID' => 'phid?',
|
||||||
|
'message' => 'text?',
|
||||||
|
'messageIDHash' => 'bytes12',
|
||||||
|
'status' => 'text32',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'relatedPHID' => array(
|
||||||
|
'columns' => array('relatedPHID'),
|
||||||
|
),
|
||||||
|
'authorPHID' => array(
|
||||||
|
'columns' => array('authorPHID'),
|
||||||
|
),
|
||||||
|
'key_messageIDHash' => array(
|
||||||
|
'columns' => array('messageIDHash'),
|
||||||
|
),
|
||||||
|
'key_created' => array(
|
||||||
|
'columns' => array('dateCreated'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorMetaMTASchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorMetaMTADAO');
|
||||||
|
$this->buildLiskSchemata('PhabricatorSMSDAO');
|
||||||
|
|
||||||
|
$this->buildEdgeSchemata(
|
||||||
|
new PhabricatorMetaMTAMail());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -22,12 +22,31 @@ final class NuanceItem
|
||||||
->setDateNuanced(time())
|
->setDateNuanced(time())
|
||||||
->setStatus(NuanceItem::STATUS_OPEN);
|
->setStatus(NuanceItem::STATUS_OPEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConfiguration() {
|
public function getConfiguration() {
|
||||||
return array(
|
return array(
|
||||||
self::CONFIG_AUX_PHID => true,
|
self::CONFIG_AUX_PHID => true,
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'data' => self::SERIALIZATION_JSON,
|
'data' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'ownerPHID' => 'phid?',
|
||||||
|
'sourceLabel' => 'text255?',
|
||||||
|
'status' => 'uint32',
|
||||||
|
'mailKey' => 'bytes20',
|
||||||
|
'dateNuanced' => 'epoch',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_source' => array(
|
||||||
|
'columns' => array('sourcePHID', 'status', 'dateNuanced'),
|
||||||
|
),
|
||||||
|
'key_owner' => array(
|
||||||
|
'columns' => array('ownerPHID', 'status', 'dateNuanced'),
|
||||||
|
),
|
||||||
|
'key_contacter' => array(
|
||||||
|
'columns' => array('requestorPHID', 'status', 'dateNuanced'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,10 @@ final class NuanceQueue
|
||||||
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(
|
||||||
|
'name' => 'text255?',
|
||||||
|
'mailKey' => 'bytes20',
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,5 +8,22 @@ final class NuanceQueueItem
|
||||||
protected $itemStatus;
|
protected $itemStatus;
|
||||||
protected $itemDateNuanced;
|
protected $itemDateNuanced;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'itemStatus' => 'uint32',
|
||||||
|
'itemDateNuanced' => 'epoch',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_one_per_queue' => array(
|
||||||
|
'columns' => array('itemPHID', 'queuePHID'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'key_queue' => array(
|
||||||
|
'columns' => array('queuePHID', 'itemStatus', 'itemDateNuanced'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
27
src/applications/nuance/storage/NuanceSchemaSpec.php
Normal file
27
src/applications/nuance/storage/NuanceSchemaSpec.php
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class NuanceSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('NuanceDAO');
|
||||||
|
$this->buildEdgeSchemata(new NuanceItem());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new NuanceItemTransaction(),
|
||||||
|
new NuanceItemTransactionComment());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new NuanceQueueTransaction(),
|
||||||
|
new NuanceQueueTransactionComment());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new NuanceRequestorTransaction(),
|
||||||
|
new NuanceRequestorTransactionComment());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new NuanceSourceTransaction(),
|
||||||
|
new NuanceSourceTransactionComment());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -16,6 +16,16 @@ final class NuanceSource extends NuanceDAO
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'data' => self::SERIALIZATION_JSON,
|
'data' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'name' => 'text255?',
|
||||||
|
'type' => 'text32',
|
||||||
|
'mailKey' => 'bytes20',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_type' => array(
|
||||||
|
'columns' => array('type', 'dateModified'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,20 @@ final class PhabricatorOAuthClientAuthorization
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'scope' => self::SERIALIZATION_JSON,
|
'scope' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'scope' => 'text',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_phid' => null,
|
||||||
|
'phid' => array(
|
||||||
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'userPHID' => array(
|
||||||
|
'columns' => array('userPHID', 'clientPHID'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorOAuthSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorOAuthServerDAO');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -7,4 +7,19 @@ final class PhabricatorOAuthServerAccessToken
|
||||||
protected $token;
|
protected $token;
|
||||||
protected $userPHID;
|
protected $userPHID;
|
||||||
protected $clientPHID;
|
protected $clientPHID;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'token' => 'text32',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'token' => array(
|
||||||
|
'columns' => array('token'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,4 +9,21 @@ final class PhabricatorOAuthServerAuthorizationCode
|
||||||
protected $clientSecret;
|
protected $clientSecret;
|
||||||
protected $userPHID;
|
protected $userPHID;
|
||||||
protected $redirectURI;
|
protected $redirectURI;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'code' => 'text32',
|
||||||
|
'clientSecret' => 'text32',
|
||||||
|
'redirectURI' => 'text255',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'code' => array(
|
||||||
|
'columns' => array('code'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,21 @@ final class PhabricatorOAuthServerClient
|
||||||
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(
|
||||||
|
'name' => 'text255',
|
||||||
|
'secret' => 'text32',
|
||||||
|
'redirectURI' => 'text255',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_phid' => null,
|
||||||
|
'phid' => array(
|
||||||
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'creatorPHID' => array(
|
||||||
|
'columns' => array('creatorPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,25 @@ final class PhabricatorSMS
|
||||||
->setProviderSMSID(Filesystem::readRandomCharacters(40));
|
->setProviderSMSID(Filesystem::readRandomCharacters(40));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'providerShortName' => 'text16',
|
||||||
|
'providerSMSID' => 'text40',
|
||||||
|
'toNumber' => 'text20',
|
||||||
|
'fromNumber' => 'text20?',
|
||||||
|
'body' => 'text',
|
||||||
|
'sendStatus' => 'text16?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_provider' => array(
|
||||||
|
'columns' => array('providerSMSID', 'providerShortName'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
public function getTableName() {
|
public function getTableName() {
|
||||||
// Slightly non-standard, but otherwise this class needs "MetaMTA" in its
|
// Slightly non-standard, but otherwise this class needs "MetaMTA" in its
|
||||||
// name. :/
|
// name. :/
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorStorageSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildRawSchema(
|
||||||
|
'meta_data',
|
||||||
|
'patch_status',
|
||||||
|
array(
|
||||||
|
'patch' => 'text255',
|
||||||
|
'applied' => 'uint32',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'PRIMARY' => array(
|
||||||
|
'columns' => array('patch'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue