mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 13:30:55 +01:00
Generate expected scheamta for Passphrase, Paste, Phlux, Phame
Summary: Ref T1191. Nothing notable in these. Test Plan: Viewed web UI. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10528
This commit is contained in:
parent
d6639b68d5
commit
502d18ede4
11 changed files with 160 additions and 0 deletions
|
@ -1105,6 +1105,7 @@ phutil_register_library_map(array(
|
|||
'PassphraseQueryConduitAPIMethod' => 'applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php',
|
||||
'PassphraseRemarkupRule' => 'applications/passphrase/remarkup/PassphraseRemarkupRule.php',
|
||||
'PassphraseSSHKey' => 'applications/passphrase/keys/PassphraseSSHKey.php',
|
||||
'PassphraseSchemaSpec' => 'applications/passphrase/storage/PassphraseSchemaSpec.php',
|
||||
'PassphraseSecret' => 'applications/passphrase/storage/PassphraseSecret.php',
|
||||
'PasteConduitAPIMethod' => 'applications/paste/conduit/PasteConduitAPIMethod.php',
|
||||
'PasteCreateConduitAPIMethod' => 'applications/paste/conduit/PasteCreateConduitAPIMethod.php',
|
||||
|
@ -1920,6 +1921,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPastePastePHIDType' => 'applications/paste/phid/PhabricatorPastePastePHIDType.php',
|
||||
'PhabricatorPasteQuery' => 'applications/paste/query/PhabricatorPasteQuery.php',
|
||||
'PhabricatorPasteRemarkupRule' => 'applications/paste/remarkup/PhabricatorPasteRemarkupRule.php',
|
||||
'PhabricatorPasteSchemaSpec' => 'applications/paste/storage/PhabricatorPasteSchemaSpec.php',
|
||||
'PhabricatorPasteSearchEngine' => 'applications/paste/query/PhabricatorPasteSearchEngine.php',
|
||||
'PhabricatorPasteTestDataGenerator' => 'applications/paste/lipsum/PhabricatorPasteTestDataGenerator.php',
|
||||
'PhabricatorPasteTransaction' => 'applications/paste/storage/PhabricatorPasteTransaction.php',
|
||||
|
@ -2493,11 +2495,13 @@ phutil_register_library_map(array(
|
|||
'PhameQueryConduitAPIMethod' => 'applications/phame/conduit/PhameQueryConduitAPIMethod.php',
|
||||
'PhameQueryPostsConduitAPIMethod' => 'applications/phame/conduit/PhameQueryPostsConduitAPIMethod.php',
|
||||
'PhameResourceController' => 'applications/phame/controller/PhameResourceController.php',
|
||||
'PhameSchemaSpec' => 'applications/phame/storage/PhameSchemaSpec.php',
|
||||
'PhameSkinSpecification' => 'applications/phame/skins/PhameSkinSpecification.php',
|
||||
'PhluxController' => 'applications/phlux/controller/PhluxController.php',
|
||||
'PhluxDAO' => 'applications/phlux/storage/PhluxDAO.php',
|
||||
'PhluxEditController' => 'applications/phlux/controller/PhluxEditController.php',
|
||||
'PhluxListController' => 'applications/phlux/controller/PhluxListController.php',
|
||||
'PhluxSchemaSpec' => 'applications/phlux/storage/PhluxSchemaSpec.php',
|
||||
'PhluxTransaction' => 'applications/phlux/storage/PhluxTransaction.php',
|
||||
'PhluxTransactionQuery' => 'applications/phlux/query/PhluxTransactionQuery.php',
|
||||
'PhluxVariable' => 'applications/phlux/storage/PhluxVariable.php',
|
||||
|
@ -4015,6 +4019,7 @@ phutil_register_library_map(array(
|
|||
'PassphraseQueryConduitAPIMethod' => 'PassphraseConduitAPIMethod',
|
||||
'PassphraseRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
||||
'PassphraseSSHKey' => 'PassphraseAbstractKey',
|
||||
'PassphraseSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||
'PassphraseSecret' => 'PassphraseDAO',
|
||||
'PasteConduitAPIMethod' => 'ConduitAPIMethod',
|
||||
'PasteCreateConduitAPIMethod' => 'PasteConduitAPIMethod',
|
||||
|
@ -4861,6 +4866,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPastePastePHIDType' => 'PhabricatorPHIDType',
|
||||
'PhabricatorPasteQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PhabricatorPasteRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
||||
'PhabricatorPasteSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||
'PhabricatorPasteSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||
'PhabricatorPasteTestDataGenerator' => 'PhabricatorTestDataGenerator',
|
||||
'PhabricatorPasteTransaction' => 'PhabricatorApplicationTransaction',
|
||||
|
@ -5490,10 +5496,12 @@ phutil_register_library_map(array(
|
|||
'PhameQueryConduitAPIMethod' => 'PhameConduitAPIMethod',
|
||||
'PhameQueryPostsConduitAPIMethod' => 'PhameConduitAPIMethod',
|
||||
'PhameResourceController' => 'CelerityResourceController',
|
||||
'PhameSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||
'PhluxController' => 'PhabricatorController',
|
||||
'PhluxDAO' => 'PhabricatorLiskDAO',
|
||||
'PhluxEditController' => 'PhluxController',
|
||||
'PhluxListController' => 'PhluxController',
|
||||
'PhluxSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||
'PhluxTransaction' => 'PhabricatorApplicationTransaction',
|
||||
'PhluxTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||
'PhluxVariable' => array(
|
||||
|
|
|
@ -35,6 +35,29 @@ final class PassphraseCredential extends PassphraseDAO
|
|||
public function getConfiguration() {
|
||||
return array(
|
||||
self::CONFIG_AUX_PHID => true,
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'name' => 'text255',
|
||||
'credentialType' => 'text64',
|
||||
'providesType' => 'text64',
|
||||
'description' => 'text',
|
||||
'username' => 'text255',
|
||||
'secretID' => 'id?',
|
||||
'isDestroyed' => 'bool',
|
||||
'isLocked' => 'bool',
|
||||
'allowConduit' => 'bool',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'key_secret' => array(
|
||||
'columns' => array('secretID'),
|
||||
'unique' => true,
|
||||
),
|
||||
'key_type' => array(
|
||||
'columns' => array('credentialType'),
|
||||
),
|
||||
'key_provides' => array(
|
||||
'columns' => array('providesType'),
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
|
|
15
src/applications/passphrase/storage/PassphraseSchemaSpec.php
Normal file
15
src/applications/passphrase/storage/PassphraseSchemaSpec.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
final class PassphraseSchemaSpec
|
||||
extends PhabricatorConfigSchemaSpec {
|
||||
|
||||
public function buildSchemata() {
|
||||
$this->buildLiskSchemata('PassphraseDAO');
|
||||
|
||||
$this->buildTransactionSchema(
|
||||
new PassphraseCredentialTransaction());
|
||||
|
||||
$this->buildEdgeSchemata(new PassphraseCredential());
|
||||
}
|
||||
|
||||
}
|
|
@ -41,6 +41,26 @@ final class PhabricatorPaste extends PhabricatorPasteDAO
|
|||
public function getConfiguration() {
|
||||
return array(
|
||||
self::CONFIG_AUX_PHID => true,
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'title' => 'text255',
|
||||
'language' => 'text64',
|
||||
'mailKey' => 'bytes20',
|
||||
'parentPHID' => 'phid?',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'parentPHID' => array(
|
||||
'columns' => array('parentPHID'),
|
||||
),
|
||||
'authorPHID' => array(
|
||||
'columns' => array('authorPHID'),
|
||||
),
|
||||
'key_dateCreated' => array(
|
||||
'columns' => array('dateCreated'),
|
||||
),
|
||||
'key_language' => array(
|
||||
'columns' => array('language'),
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorPasteSchemaSpec
|
||||
extends PhabricatorConfigSchemaSpec {
|
||||
|
||||
public function buildSchemata() {
|
||||
$this->buildLiskSchemata('PhabricatorPasteDAO');
|
||||
|
||||
$this->buildTransactionSchema(
|
||||
new PhabricatorPasteTransaction(),
|
||||
new PhabricatorPasteTransactionComment());
|
||||
|
||||
$this->buildEdgeSchemata(new PhabricatorPaste());
|
||||
}
|
||||
|
||||
}
|
|
@ -15,4 +15,13 @@ final class PhabricatorPasteTransactionComment
|
|||
return ($this->getTransactionPHID() != null);
|
||||
}
|
||||
|
||||
public function getConfiguration() {
|
||||
$config = parent::getConfiguration();
|
||||
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
||||
'lineNumber' => 'uint32?',
|
||||
'lineLength' => 'uint32?',
|
||||
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
||||
return $config;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,6 +27,23 @@ final class PhameBlog extends PhameDAO
|
|||
self::CONFIG_SERIALIZATION => array(
|
||||
'configData' => self::SERIALIZATION_JSON,
|
||||
),
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'name' => 'text64',
|
||||
'description' => 'text',
|
||||
'domain' => 'text255?',
|
||||
'joinPolicy' => 'policy',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'key_phid' => null,
|
||||
'phid' => array(
|
||||
'columns' => array('phid'),
|
||||
'unique' => true,
|
||||
),
|
||||
'domain' => array(
|
||||
'columns' => array('domain'),
|
||||
'unique' => true,
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,27 @@ final class PhamePost extends PhameDAO
|
|||
self::CONFIG_SERIALIZATION => array(
|
||||
'configData' => self::SERIALIZATION_JSON,
|
||||
),
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'title' => 'text255',
|
||||
'phameTitle' => 'text64',
|
||||
'body' => 'text',
|
||||
'visibility' => 'uint32',
|
||||
'datePublished' => 'epoch?',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'key_phid' => null,
|
||||
'phid' => array(
|
||||
'columns' => array('phid'),
|
||||
'unique' => true,
|
||||
),
|
||||
'phameTitle' => array(
|
||||
'columns' => array('bloggerPHID', 'phameTitle'),
|
||||
'unique' => true,
|
||||
),
|
||||
'bloggerPosts' => array(
|
||||
'columns' => array('bloggerPHID', 'visibility', 'datePublished'),
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
|
|
11
src/applications/phame/storage/PhameSchemaSpec.php
Normal file
11
src/applications/phame/storage/PhameSchemaSpec.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class PhameSchemaSpec
|
||||
extends PhabricatorConfigSchemaSpec {
|
||||
|
||||
public function buildSchemata() {
|
||||
$this->buildLiskSchemata('PhameDAO');
|
||||
$this->buildEdgeSchemata(new PhameBlog());
|
||||
}
|
||||
|
||||
}
|
11
src/applications/phlux/storage/PhluxSchemaSpec.php
Normal file
11
src/applications/phlux/storage/PhluxSchemaSpec.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class PhluxSchemaSpec
|
||||
extends PhabricatorConfigSchemaSpec {
|
||||
|
||||
public function buildSchemata() {
|
||||
$this->buildLiskSchemata('PhluxDAO');
|
||||
$this->buildTransactionSchema(new PhluxTransaction());
|
||||
}
|
||||
|
||||
}
|
|
@ -16,6 +16,15 @@ final class PhluxVariable extends PhluxDAO
|
|||
self::CONFIG_SERIALIZATION => array(
|
||||
'variableValue' => self::SERIALIZATION_JSON
|
||||
),
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'variableKey' => 'text64',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'key_key' => array(
|
||||
'columns' => array('variableKey'),
|
||||
'unique' => true,
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue