mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-03 19:31:02 +01:00
Generate expected schemata for Pholio, Phortune, Phragment, Phriction and Policy
Summary: Ref T1191. Nothing too out-of-the-ordinary here. Test Plan: Saw fewer than 500 remaining issues. Reviewers: btrahan Reviewed By: btrahan Subscribers: chad, epriestley, hach-que Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10587
This commit is contained in:
parent
e7b590a1cf
commit
cfbcd69e9b
24 changed files with 320 additions and 0 deletions
|
@ -2000,6 +2000,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPolicyRuleLunarPhase' => 'applications/policy/rule/PhabricatorPolicyRuleLunarPhase.php',
|
'PhabricatorPolicyRuleLunarPhase' => 'applications/policy/rule/PhabricatorPolicyRuleLunarPhase.php',
|
||||||
'PhabricatorPolicyRuleProjects' => 'applications/policy/rule/PhabricatorPolicyRuleProjects.php',
|
'PhabricatorPolicyRuleProjects' => 'applications/policy/rule/PhabricatorPolicyRuleProjects.php',
|
||||||
'PhabricatorPolicyRuleUsers' => 'applications/policy/rule/PhabricatorPolicyRuleUsers.php',
|
'PhabricatorPolicyRuleUsers' => 'applications/policy/rule/PhabricatorPolicyRuleUsers.php',
|
||||||
|
'PhabricatorPolicySchemaSpec' => 'applications/policy/storage/PhabricatorPolicySchemaSpec.php',
|
||||||
'PhabricatorPolicyTestCase' => 'applications/policy/__tests__/PhabricatorPolicyTestCase.php',
|
'PhabricatorPolicyTestCase' => 'applications/policy/__tests__/PhabricatorPolicyTestCase.php',
|
||||||
'PhabricatorPolicyTestObject' => 'applications/policy/__tests__/PhabricatorPolicyTestObject.php',
|
'PhabricatorPolicyTestObject' => 'applications/policy/__tests__/PhabricatorPolicyTestObject.php',
|
||||||
'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php',
|
'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php',
|
||||||
|
@ -2541,6 +2542,7 @@ phutil_register_library_map(array(
|
||||||
'PholioMockViewController' => 'applications/pholio/controller/PholioMockViewController.php',
|
'PholioMockViewController' => 'applications/pholio/controller/PholioMockViewController.php',
|
||||||
'PholioRemarkupRule' => 'applications/pholio/remarkup/PholioRemarkupRule.php',
|
'PholioRemarkupRule' => 'applications/pholio/remarkup/PholioRemarkupRule.php',
|
||||||
'PholioReplyHandler' => 'applications/pholio/mail/PholioReplyHandler.php',
|
'PholioReplyHandler' => 'applications/pholio/mail/PholioReplyHandler.php',
|
||||||
|
'PholioSchemaSpec' => 'applications/pholio/storage/PholioSchemaSpec.php',
|
||||||
'PholioSearchIndexer' => 'applications/pholio/search/PholioSearchIndexer.php',
|
'PholioSearchIndexer' => 'applications/pholio/search/PholioSearchIndexer.php',
|
||||||
'PholioTransaction' => 'applications/pholio/storage/PholioTransaction.php',
|
'PholioTransaction' => 'applications/pholio/storage/PholioTransaction.php',
|
||||||
'PholioTransactionComment' => 'applications/pholio/storage/PholioTransactionComment.php',
|
'PholioTransactionComment' => 'applications/pholio/storage/PholioTransactionComment.php',
|
||||||
|
@ -2595,6 +2597,7 @@ phutil_register_library_map(array(
|
||||||
'PhortunePurchase' => 'applications/phortune/storage/PhortunePurchase.php',
|
'PhortunePurchase' => 'applications/phortune/storage/PhortunePurchase.php',
|
||||||
'PhortunePurchaseQuery' => 'applications/phortune/query/PhortunePurchaseQuery.php',
|
'PhortunePurchaseQuery' => 'applications/phortune/query/PhortunePurchaseQuery.php',
|
||||||
'PhortunePurchaseViewController' => 'applications/phortune/controller/PhortunePurchaseViewController.php',
|
'PhortunePurchaseViewController' => 'applications/phortune/controller/PhortunePurchaseViewController.php',
|
||||||
|
'PhortuneSchemaSpec' => 'applications/phortune/storage/PhortuneSchemaSpec.php',
|
||||||
'PhortuneStripePaymentProvider' => 'applications/phortune/provider/PhortuneStripePaymentProvider.php',
|
'PhortuneStripePaymentProvider' => 'applications/phortune/provider/PhortuneStripePaymentProvider.php',
|
||||||
'PhortuneTestExtraPaymentProvider' => 'applications/phortune/provider/__tests__/PhortuneTestExtraPaymentProvider.php',
|
'PhortuneTestExtraPaymentProvider' => 'applications/phortune/provider/__tests__/PhortuneTestExtraPaymentProvider.php',
|
||||||
'PhortuneTestPaymentProvider' => 'applications/phortune/provider/PhortuneTestPaymentProvider.php',
|
'PhortuneTestPaymentProvider' => 'applications/phortune/provider/PhortuneTestPaymentProvider.php',
|
||||||
|
@ -2618,6 +2621,7 @@ phutil_register_library_map(array(
|
||||||
'PhragmentPolicyController' => 'applications/phragment/controller/PhragmentPolicyController.php',
|
'PhragmentPolicyController' => 'applications/phragment/controller/PhragmentPolicyController.php',
|
||||||
'PhragmentQueryFragmentsConduitAPIMethod' => 'applications/phragment/conduit/PhragmentQueryFragmentsConduitAPIMethod.php',
|
'PhragmentQueryFragmentsConduitAPIMethod' => 'applications/phragment/conduit/PhragmentQueryFragmentsConduitAPIMethod.php',
|
||||||
'PhragmentRevertController' => 'applications/phragment/controller/PhragmentRevertController.php',
|
'PhragmentRevertController' => 'applications/phragment/controller/PhragmentRevertController.php',
|
||||||
|
'PhragmentSchemaSpec' => 'applications/phragment/storage/PhragmentSchemaSpec.php',
|
||||||
'PhragmentSnapshot' => 'applications/phragment/storage/PhragmentSnapshot.php',
|
'PhragmentSnapshot' => 'applications/phragment/storage/PhragmentSnapshot.php',
|
||||||
'PhragmentSnapshotChild' => 'applications/phragment/storage/PhragmentSnapshotChild.php',
|
'PhragmentSnapshotChild' => 'applications/phragment/storage/PhragmentSnapshotChild.php',
|
||||||
'PhragmentSnapshotChildQuery' => 'applications/phragment/query/PhragmentSnapshotChildQuery.php',
|
'PhragmentSnapshotChildQuery' => 'applications/phragment/query/PhragmentSnapshotChildQuery.php',
|
||||||
|
@ -2636,6 +2640,7 @@ phutil_register_library_map(array(
|
||||||
'PhrequentListController' => 'applications/phrequent/controller/PhrequentListController.php',
|
'PhrequentListController' => 'applications/phrequent/controller/PhrequentListController.php',
|
||||||
'PhrequentPopConduitAPIMethod' => 'applications/phrequent/conduit/PhrequentPopConduitAPIMethod.php',
|
'PhrequentPopConduitAPIMethod' => 'applications/phrequent/conduit/PhrequentPopConduitAPIMethod.php',
|
||||||
'PhrequentPushConduitAPIMethod' => 'applications/phrequent/conduit/PhrequentPushConduitAPIMethod.php',
|
'PhrequentPushConduitAPIMethod' => 'applications/phrequent/conduit/PhrequentPushConduitAPIMethod.php',
|
||||||
|
'PhrequentSchemaSpec' => 'applications/phrequent/storage/PhrequentSchemaSpec.php',
|
||||||
'PhrequentSearchEngine' => 'applications/phrequent/query/PhrequentSearchEngine.php',
|
'PhrequentSearchEngine' => 'applications/phrequent/query/PhrequentSearchEngine.php',
|
||||||
'PhrequentTimeBlock' => 'applications/phrequent/storage/PhrequentTimeBlock.php',
|
'PhrequentTimeBlock' => 'applications/phrequent/storage/PhrequentTimeBlock.php',
|
||||||
'PhrequentTimeBlockTestCase' => 'applications/phrequent/storage/__tests__/PhrequentTimeBlockTestCase.php',
|
'PhrequentTimeBlockTestCase' => 'applications/phrequent/storage/__tests__/PhrequentTimeBlockTestCase.php',
|
||||||
|
@ -2674,6 +2679,7 @@ phutil_register_library_map(array(
|
||||||
'PhrictionMoveController' => 'applications/phriction/controller/PhrictionMoveController.php',
|
'PhrictionMoveController' => 'applications/phriction/controller/PhrictionMoveController.php',
|
||||||
'PhrictionNewController' => 'applications/phriction/controller/PhrictionNewController.php',
|
'PhrictionNewController' => 'applications/phriction/controller/PhrictionNewController.php',
|
||||||
'PhrictionRemarkupRule' => 'applications/phriction/markup/PhrictionRemarkupRule.php',
|
'PhrictionRemarkupRule' => 'applications/phriction/markup/PhrictionRemarkupRule.php',
|
||||||
|
'PhrictionSchemaSpec' => 'applications/phriction/storage/PhrictionSchemaSpec.php',
|
||||||
'PhrictionSearchEngine' => 'applications/phriction/query/PhrictionSearchEngine.php',
|
'PhrictionSearchEngine' => 'applications/phriction/query/PhrictionSearchEngine.php',
|
||||||
'PhrictionSearchIndexer' => 'applications/phriction/search/PhrictionSearchIndexer.php',
|
'PhrictionSearchIndexer' => 'applications/phriction/search/PhrictionSearchIndexer.php',
|
||||||
'PonderAddAnswerView' => 'applications/ponder/view/PonderAddAnswerView.php',
|
'PonderAddAnswerView' => 'applications/ponder/view/PonderAddAnswerView.php',
|
||||||
|
@ -4951,6 +4957,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPolicyRuleLunarPhase' => 'PhabricatorPolicyRule',
|
'PhabricatorPolicyRuleLunarPhase' => 'PhabricatorPolicyRule',
|
||||||
'PhabricatorPolicyRuleProjects' => 'PhabricatorPolicyRule',
|
'PhabricatorPolicyRuleProjects' => 'PhabricatorPolicyRule',
|
||||||
'PhabricatorPolicyRuleUsers' => 'PhabricatorPolicyRule',
|
'PhabricatorPolicyRuleUsers' => 'PhabricatorPolicyRule',
|
||||||
|
'PhabricatorPolicySchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorPolicyTestCase' => 'PhabricatorTestCase',
|
'PhabricatorPolicyTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorPolicyTestObject' => 'PhabricatorPolicyInterface',
|
'PhabricatorPolicyTestObject' => 'PhabricatorPolicyInterface',
|
||||||
'PhabricatorPolicyType' => 'PhabricatorPolicyConstants',
|
'PhabricatorPolicyType' => 'PhabricatorPolicyConstants',
|
||||||
|
@ -5564,6 +5571,7 @@ phutil_register_library_map(array(
|
||||||
'PholioMockViewController' => 'PholioController',
|
'PholioMockViewController' => 'PholioController',
|
||||||
'PholioRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
'PholioRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
||||||
'PholioReplyHandler' => 'PhabricatorMailReplyHandler',
|
'PholioReplyHandler' => 'PhabricatorMailReplyHandler',
|
||||||
|
'PholioSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PholioSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
|
'PholioSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
|
||||||
'PholioTransaction' => 'PhabricatorApplicationTransaction',
|
'PholioTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
'PholioTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
'PholioTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
||||||
|
@ -5633,6 +5641,7 @@ phutil_register_library_map(array(
|
||||||
),
|
),
|
||||||
'PhortunePurchaseQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhortunePurchaseQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'PhortunePurchaseViewController' => 'PhortuneController',
|
'PhortunePurchaseViewController' => 'PhortuneController',
|
||||||
|
'PhortuneSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhortuneStripePaymentProvider' => 'PhortunePaymentProvider',
|
'PhortuneStripePaymentProvider' => 'PhortunePaymentProvider',
|
||||||
'PhortuneTestExtraPaymentProvider' => 'PhortunePaymentProvider',
|
'PhortuneTestExtraPaymentProvider' => 'PhortunePaymentProvider',
|
||||||
'PhortuneTestPaymentProvider' => 'PhortunePaymentProvider',
|
'PhortuneTestPaymentProvider' => 'PhortunePaymentProvider',
|
||||||
|
@ -5662,6 +5671,7 @@ phutil_register_library_map(array(
|
||||||
'PhragmentPolicyController' => 'PhragmentController',
|
'PhragmentPolicyController' => 'PhragmentController',
|
||||||
'PhragmentQueryFragmentsConduitAPIMethod' => 'PhragmentConduitAPIMethod',
|
'PhragmentQueryFragmentsConduitAPIMethod' => 'PhragmentConduitAPIMethod',
|
||||||
'PhragmentRevertController' => 'PhragmentController',
|
'PhragmentRevertController' => 'PhragmentController',
|
||||||
|
'PhragmentSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhragmentSnapshot' => array(
|
'PhragmentSnapshot' => array(
|
||||||
'PhragmentDAO',
|
'PhragmentDAO',
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
|
@ -5686,6 +5696,7 @@ phutil_register_library_map(array(
|
||||||
'PhrequentListController' => 'PhrequentController',
|
'PhrequentListController' => 'PhrequentController',
|
||||||
'PhrequentPopConduitAPIMethod' => 'PhrequentConduitAPIMethod',
|
'PhrequentPopConduitAPIMethod' => 'PhrequentConduitAPIMethod',
|
||||||
'PhrequentPushConduitAPIMethod' => 'PhrequentConduitAPIMethod',
|
'PhrequentPushConduitAPIMethod' => 'PhrequentConduitAPIMethod',
|
||||||
|
'PhrequentSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhrequentSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'PhrequentSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'PhrequentTimeBlock' => 'Phobject',
|
'PhrequentTimeBlock' => 'Phobject',
|
||||||
'PhrequentTimeBlockTestCase' => 'PhabricatorTestCase',
|
'PhrequentTimeBlockTestCase' => 'PhabricatorTestCase',
|
||||||
|
@ -5735,6 +5746,7 @@ phutil_register_library_map(array(
|
||||||
'PhrictionMoveController' => 'PhrictionController',
|
'PhrictionMoveController' => 'PhrictionController',
|
||||||
'PhrictionNewController' => 'PhrictionController',
|
'PhrictionNewController' => 'PhrictionController',
|
||||||
'PhrictionRemarkupRule' => 'PhutilRemarkupRule',
|
'PhrictionRemarkupRule' => 'PhutilRemarkupRule',
|
||||||
|
'PhrictionSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhrictionSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'PhrictionSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'PhrictionSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
|
'PhrictionSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
|
||||||
'PonderAddAnswerView' => 'AphrontView',
|
'PonderAddAnswerView' => 'AphrontView',
|
||||||
|
|
|
@ -22,6 +22,24 @@ final class PholioImage extends PholioDAO
|
||||||
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(
|
||||||
|
'mockID' => 'id?',
|
||||||
|
'name' => 'text128',
|
||||||
|
'description' => 'text',
|
||||||
|
'sequence' => 'uint32',
|
||||||
|
'isObsolete' => 'bool',
|
||||||
|
'replacesImagePHID' => 'phid?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_phid' => null,
|
||||||
|
'keyPHID' => array(
|
||||||
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'mockID' => array(
|
||||||
|
'columns' => array('mockID', 'isObsolete', 'sequence'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,23 @@ final class PholioMock extends PholioDAO
|
||||||
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' => 'text128',
|
||||||
|
'description' => 'text',
|
||||||
|
'originalName' => 'text128',
|
||||||
|
'mailKey' => 'bytes20',
|
||||||
|
'status' => 'text12',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_phid' => null,
|
||||||
|
'phid' => array(
|
||||||
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'authorPHID' => array(
|
||||||
|
'columns' => array('authorPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
src/applications/pholio/storage/PholioSchemaSpec.php
Normal file
15
src/applications/pholio/storage/PholioSchemaSpec.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PholioSchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PholioDAO');
|
||||||
|
|
||||||
|
$this->buildEdgeSchemata(new PholioMock());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new PholioTransaction(),
|
||||||
|
new PholioTransactionComment());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,6 +14,26 @@ final class PholioTransactionComment
|
||||||
return new PholioTransaction();
|
return new PholioTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
$config = parent::getConfiguration();
|
||||||
|
|
||||||
|
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
||||||
|
'imageID' => 'id?',
|
||||||
|
'x' => 'uint32?',
|
||||||
|
'y' => 'uint32?',
|
||||||
|
'width' => 'uint32?',
|
||||||
|
'height' => 'uint32?',
|
||||||
|
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
||||||
|
|
||||||
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
||||||
|
'key_draft' => array(
|
||||||
|
'columns' => array('authorPHID', 'imageID', 'transactionPHID'),
|
||||||
|
),
|
||||||
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
||||||
|
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
public function toDictionary() {
|
public function toDictionary() {
|
||||||
return array(
|
return array(
|
||||||
'id' => $this->getID(),
|
'id' => $this->getID(),
|
||||||
|
|
|
@ -17,6 +17,10 @@ final class PhortuneAccount extends PhortuneDAO
|
||||||
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',
|
||||||
|
'balanceInCents' => 'sint64',
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,14 @@ final class PhortuneCart extends PhortuneDAO
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'metadata' => self::SERIALIZATION_JSON,
|
'metadata' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'status' => 'text32',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_account' => array(
|
||||||
|
'columns' => array('accountPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,20 @@ final class PhortuneCharge extends PhortuneDAO
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'metadata' => self::SERIALIZATION_JSON,
|
'metadata' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'paymentProviderKey' => 'text128',
|
||||||
|
'paymentMethodPHID' => 'phid?',
|
||||||
|
'amountInCents' => 'sint32',
|
||||||
|
'status' => 'text32',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_cart' => array(
|
||||||
|
'columns' => array('cartPHID'),
|
||||||
|
),
|
||||||
|
'key_account' => array(
|
||||||
|
'columns' => array('accountPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,20 @@ final class PhortunePaymentMethod extends PhortuneDAO
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'metadata' => self::SERIALIZATION_JSON,
|
'metadata' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'name' => 'text255',
|
||||||
|
'status' => 'text64',
|
||||||
|
'brand' => 'text64',
|
||||||
|
'expires' => 'text16',
|
||||||
|
'providerType' => 'text16',
|
||||||
|
'providerDomain' => 'text64',
|
||||||
|
'lastFourDigits' => 'text16',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_account' => array(
|
||||||
|
'columns' => array('accountPHID', 'status'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,19 @@ final class PhortuneProduct extends PhortuneDAO
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'metadata' => self::SERIALIZATION_JSON,
|
'metadata' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'productName' => 'text255',
|
||||||
|
'productType' => 'text64',
|
||||||
|
'status' => 'text64',
|
||||||
|
'priceInCents' => 'sint64',
|
||||||
|
'billingIntervalInMonths' => 'uint32?',
|
||||||
|
'trialPeriodInDays' => 'uint32?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_status' => array(
|
||||||
|
'columns' => array('status'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,18 @@ final class PhortunePurchase extends PhortuneDAO
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'metadata' => self::SERIALIZATION_JSON,
|
'metadata' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'cartPHID' => 'phid?',
|
||||||
|
'basePriceInCents' => 'sint32',
|
||||||
|
'quantity' => 'uint32',
|
||||||
|
'totalPriceInCents' => 'sint32',
|
||||||
|
'status' => 'text32',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_cart' => array(
|
||||||
|
'columns' => array('cartPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
17
src/applications/phortune/storage/PhortuneSchemaSpec.php
Normal file
17
src/applications/phortune/storage/PhortuneSchemaSpec.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhortuneSchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhortuneDAO');
|
||||||
|
|
||||||
|
$this->buildEdgeSchemata(new PhortuneAccount());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new PhortuneAccountTransaction());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new PhortuneProductTransaction());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,6 +14,17 @@ final class PhragmentFragment extends PhragmentDAO
|
||||||
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(
|
||||||
|
'path' => 'text255',
|
||||||
|
'depth' => 'uint32',
|
||||||
|
'latestVersionPHID' => 'phid?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_path' => array(
|
||||||
|
'columns' => array('path'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,16 @@ final class PhragmentFragmentVersion extends PhragmentDAO
|
||||||
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(
|
||||||
|
'sequence' => 'uint32',
|
||||||
|
'filePHID' => 'phid?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_version' => array(
|
||||||
|
'columns' => array('fragmentPHID', 'sequence'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
src/applications/phragment/storage/PhragmentSchemaSpec.php
Normal file
11
src/applications/phragment/storage/PhragmentSchemaSpec.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhragmentSchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhragmentDAO');
|
||||||
|
|
||||||
|
$this->buildEdgeSchemata(new PhragmentFragment());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -11,6 +11,15 @@ final class PhragmentSnapshot extends PhragmentDAO
|
||||||
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',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_name' => array(
|
||||||
|
'columns' => array('primaryFragmentPHID', 'name'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,24 @@ final class PhragmentSnapshotChild extends PhragmentDAO
|
||||||
private $fragment = self::ATTACHABLE;
|
private $fragment = self::ATTACHABLE;
|
||||||
private $fragmentVersion = self::ATTACHABLE;
|
private $fragmentVersion = self::ATTACHABLE;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'fragmentVersionPHID' => 'phid?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_child' => array(
|
||||||
|
'columns' => array(
|
||||||
|
'snapshotPHID',
|
||||||
|
'fragmentPHID',
|
||||||
|
'fragmentVersionPHID',
|
||||||
|
),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
public function getSnapshot() {
|
public function getSnapshot() {
|
||||||
return $this->assertAttached($this->snapshot);
|
return $this->assertAttached($this->snapshot);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhrequentSchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhrequentDAO');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -11,6 +11,17 @@ final class PhrequentUserTime extends PhrequentDAO
|
||||||
|
|
||||||
private $preemptingEvents = self::ATTACHABLE;
|
private $preemptingEvents = self::ATTACHABLE;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'objectPHID' => 'phid?',
|
||||||
|
'note' => 'text?',
|
||||||
|
'dateStarted' => 'epoch',
|
||||||
|
'dateEnded' => 'epoch?',
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
public function getCapabilities() {
|
public function getCapabilities() {
|
||||||
return array(
|
return array(
|
||||||
PhabricatorPolicyCapability::CAN_VIEW,
|
PhabricatorPolicyCapability::CAN_VIEW,
|
||||||
|
|
|
@ -28,6 +28,32 @@ final class PhrictionContent extends PhrictionDAO
|
||||||
$viewer);
|
$viewer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'version' => 'uint32',
|
||||||
|
'title' => 'text',
|
||||||
|
'slug' => 'text128',
|
||||||
|
'content' => 'text',
|
||||||
|
'description' => 'text',
|
||||||
|
'changeType' => 'uint32',
|
||||||
|
'changeRef' => 'uint32?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'documentID' => array(
|
||||||
|
'columns' => array('documentID', 'version'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'authorPHID' => array(
|
||||||
|
'columns' => array('authorPHID'),
|
||||||
|
),
|
||||||
|
'slug' => array(
|
||||||
|
'columns' => array('slug(255)'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( Markup Interface )--------------------------------------------------- */
|
/* -( Markup Interface )--------------------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,27 @@ final class PhrictionDocument extends PhrictionDAO
|
||||||
return array(
|
return array(
|
||||||
self::CONFIG_AUX_PHID => true,
|
self::CONFIG_AUX_PHID => true,
|
||||||
self::CONFIG_TIMESTAMPS => false,
|
self::CONFIG_TIMESTAMPS => false,
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'slug' => 'text128',
|
||||||
|
'depth' => 'uint32',
|
||||||
|
'contentID' => 'id?',
|
||||||
|
'status' => 'uint32',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_phid' => null,
|
||||||
|
'phid' => array(
|
||||||
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'slug' => array(
|
||||||
|
'columns' => array('slug'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
'depth' => array(
|
||||||
|
'columns' => array('depth', 'slug'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
src/applications/phriction/storage/PhrictionSchemaSpec.php
Normal file
11
src/applications/phriction/storage/PhrictionSchemaSpec.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhrictionSchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhrictionDAO');
|
||||||
|
|
||||||
|
$this->buildEdgeSchemata(new PhrictionDocument());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -25,6 +25,16 @@ final class PhabricatorPolicy
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'rules' => self::SERIALIZATION_JSON,
|
'rules' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'defaultAction' => 'text32',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_phid' => null,
|
||||||
|
'phid' => array(
|
||||||
|
'columns' => array('phid'),
|
||||||
|
'unique' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorPolicySchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorPolicyDAO');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue