diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1105,6 +1105,7 @@ '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 @@ '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 @@ '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 @@ 'PassphraseQueryConduitAPIMethod' => 'PassphraseConduitAPIMethod', 'PassphraseRemarkupRule' => 'PhabricatorObjectRemarkupRule', 'PassphraseSSHKey' => 'PassphraseAbstractKey', + 'PassphraseSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PassphraseSecret' => 'PassphraseDAO', 'PasteConduitAPIMethod' => 'ConduitAPIMethod', 'PasteCreateConduitAPIMethod' => 'PasteConduitAPIMethod', @@ -4861,6 +4866,7 @@ 'PhabricatorPastePastePHIDType' => 'PhabricatorPHIDType', 'PhabricatorPasteQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorPasteRemarkupRule' => 'PhabricatorObjectRemarkupRule', + 'PhabricatorPasteSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorPasteSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorPasteTestDataGenerator' => 'PhabricatorTestDataGenerator', 'PhabricatorPasteTransaction' => 'PhabricatorApplicationTransaction', @@ -5490,10 +5496,12 @@ 'PhameQueryConduitAPIMethod' => 'PhameConduitAPIMethod', 'PhameQueryPostsConduitAPIMethod' => 'PhameConduitAPIMethod', 'PhameResourceController' => 'CelerityResourceController', + 'PhameSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhluxController' => 'PhabricatorController', 'PhluxDAO' => 'PhabricatorLiskDAO', 'PhluxEditController' => 'PhluxController', 'PhluxListController' => 'PhluxController', + 'PhluxSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhluxTransaction' => 'PhabricatorApplicationTransaction', 'PhluxTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhluxVariable' => array( diff --git a/src/applications/passphrase/storage/PassphraseCredential.php b/src/applications/passphrase/storage/PassphraseCredential.php --- a/src/applications/passphrase/storage/PassphraseCredential.php +++ b/src/applications/passphrase/storage/PassphraseCredential.php @@ -35,6 +35,29 @@ 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(); } diff --git a/src/applications/passphrase/storage/PassphraseSchemaSpec.php b/src/applications/passphrase/storage/PassphraseSchemaSpec.php new file mode 100644 --- /dev/null +++ b/src/applications/passphrase/storage/PassphraseSchemaSpec.php @@ -0,0 +1,15 @@ +buildLiskSchemata('PassphraseDAO'); + + $this->buildTransactionSchema( + new PassphraseCredentialTransaction()); + + $this->buildEdgeSchemata(new PassphraseCredential()); + } + +} diff --git a/src/applications/paste/storage/PhabricatorPaste.php b/src/applications/paste/storage/PhabricatorPaste.php --- a/src/applications/paste/storage/PhabricatorPaste.php +++ b/src/applications/paste/storage/PhabricatorPaste.php @@ -41,6 +41,26 @@ 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(); } diff --git a/src/applications/paste/storage/PhabricatorPasteSchemaSpec.php b/src/applications/paste/storage/PhabricatorPasteSchemaSpec.php new file mode 100644 --- /dev/null +++ b/src/applications/paste/storage/PhabricatorPasteSchemaSpec.php @@ -0,0 +1,16 @@ +buildLiskSchemata('PhabricatorPasteDAO'); + + $this->buildTransactionSchema( + new PhabricatorPasteTransaction(), + new PhabricatorPasteTransactionComment()); + + $this->buildEdgeSchemata(new PhabricatorPaste()); + } + +} diff --git a/src/applications/paste/storage/PhabricatorPasteTransactionComment.php b/src/applications/paste/storage/PhabricatorPasteTransactionComment.php --- a/src/applications/paste/storage/PhabricatorPasteTransactionComment.php +++ b/src/applications/paste/storage/PhabricatorPasteTransactionComment.php @@ -15,4 +15,13 @@ 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; + } + } diff --git a/src/applications/phame/storage/PhameBlog.php b/src/applications/phame/storage/PhameBlog.php --- a/src/applications/phame/storage/PhameBlog.php +++ b/src/applications/phame/storage/PhameBlog.php @@ -27,6 +27,23 @@ 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(); } diff --git a/src/applications/phame/storage/PhamePost.php b/src/applications/phame/storage/PhamePost.php --- a/src/applications/phame/storage/PhamePost.php +++ b/src/applications/phame/storage/PhamePost.php @@ -88,6 +88,27 @@ 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(); } diff --git a/src/applications/phame/storage/PhameSchemaSpec.php b/src/applications/phame/storage/PhameSchemaSpec.php new file mode 100644 --- /dev/null +++ b/src/applications/phame/storage/PhameSchemaSpec.php @@ -0,0 +1,11 @@ +buildLiskSchemata('PhameDAO'); + $this->buildEdgeSchemata(new PhameBlog()); + } + +} diff --git a/src/applications/phlux/storage/PhluxSchemaSpec.php b/src/applications/phlux/storage/PhluxSchemaSpec.php new file mode 100644 --- /dev/null +++ b/src/applications/phlux/storage/PhluxSchemaSpec.php @@ -0,0 +1,11 @@ +buildLiskSchemata('PhluxDAO'); + $this->buildTransactionSchema(new PhluxTransaction()); + } + +} diff --git a/src/applications/phlux/storage/PhluxVariable.php b/src/applications/phlux/storage/PhluxVariable.php --- a/src/applications/phlux/storage/PhluxVariable.php +++ b/src/applications/phlux/storage/PhluxVariable.php @@ -16,6 +16,15 @@ 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(); }