Add expected schemata for Fund, Files, Flags and Legalpad
Summary: Ref T1191. Nothing too exciting in these. Test Plan: Saw more blue in UI. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10521
This commit is contained in:
@@ -683,6 +683,7 @@ phutil_register_library_map(array(
|
|||||||
'FundInitiativeTransaction' => 'applications/fund/storage/FundInitiativeTransaction.php',
|
'FundInitiativeTransaction' => 'applications/fund/storage/FundInitiativeTransaction.php',
|
||||||
'FundInitiativeTransactionQuery' => 'applications/fund/query/FundInitiativeTransactionQuery.php',
|
'FundInitiativeTransactionQuery' => 'applications/fund/query/FundInitiativeTransactionQuery.php',
|
||||||
'FundInitiativeViewController' => 'applications/fund/controller/FundInitiativeViewController.php',
|
'FundInitiativeViewController' => 'applications/fund/controller/FundInitiativeViewController.php',
|
||||||
|
'FundSchemaSpec' => 'applications/fund/storage/FundSchemaSpec.php',
|
||||||
'HarbormasterBuild' => 'applications/harbormaster/storage/build/HarbormasterBuild.php',
|
'HarbormasterBuild' => 'applications/harbormaster/storage/build/HarbormasterBuild.php',
|
||||||
'HarbormasterBuildAbortedException' => 'applications/harbormaster/exception/HarbormasterBuildAbortedException.php',
|
'HarbormasterBuildAbortedException' => 'applications/harbormaster/exception/HarbormasterBuildAbortedException.php',
|
||||||
'HarbormasterBuildActionController' => 'applications/harbormaster/controller/HarbormasterBuildActionController.php',
|
'HarbormasterBuildActionController' => 'applications/harbormaster/controller/HarbormasterBuildActionController.php',
|
||||||
@@ -860,6 +861,7 @@ phutil_register_library_map(array(
|
|||||||
'LegalpadDocumentSignatureViewController' => 'applications/legalpad/controller/LegalpadDocumentSignatureViewController.php',
|
'LegalpadDocumentSignatureViewController' => 'applications/legalpad/controller/LegalpadDocumentSignatureViewController.php',
|
||||||
'LegalpadMockMailReceiver' => 'applications/legalpad/mail/LegalpadMockMailReceiver.php',
|
'LegalpadMockMailReceiver' => 'applications/legalpad/mail/LegalpadMockMailReceiver.php',
|
||||||
'LegalpadReplyHandler' => 'applications/legalpad/mail/LegalpadReplyHandler.php',
|
'LegalpadReplyHandler' => 'applications/legalpad/mail/LegalpadReplyHandler.php',
|
||||||
|
'LegalpadSchemaSpec' => 'applications/legalpad/storage/LegalpadSchemaSpec.php',
|
||||||
'LegalpadTransaction' => 'applications/legalpad/storage/LegalpadTransaction.php',
|
'LegalpadTransaction' => 'applications/legalpad/storage/LegalpadTransaction.php',
|
||||||
'LegalpadTransactionComment' => 'applications/legalpad/storage/LegalpadTransactionComment.php',
|
'LegalpadTransactionComment' => 'applications/legalpad/storage/LegalpadTransactionComment.php',
|
||||||
'LegalpadTransactionQuery' => 'applications/legalpad/query/LegalpadTransactionQuery.php',
|
'LegalpadTransactionQuery' => 'applications/legalpad/query/LegalpadTransactionQuery.php',
|
||||||
@@ -1611,6 +1613,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorFileLinkView' => 'view/layout/PhabricatorFileLinkView.php',
|
'PhabricatorFileLinkView' => 'view/layout/PhabricatorFileLinkView.php',
|
||||||
'PhabricatorFileListController' => 'applications/files/controller/PhabricatorFileListController.php',
|
'PhabricatorFileListController' => 'applications/files/controller/PhabricatorFileListController.php',
|
||||||
'PhabricatorFileQuery' => 'applications/files/query/PhabricatorFileQuery.php',
|
'PhabricatorFileQuery' => 'applications/files/query/PhabricatorFileQuery.php',
|
||||||
|
'PhabricatorFileSchemaSpec' => 'applications/files/storage/PhabricatorFileSchemaSpec.php',
|
||||||
'PhabricatorFileSearchEngine' => 'applications/files/query/PhabricatorFileSearchEngine.php',
|
'PhabricatorFileSearchEngine' => 'applications/files/query/PhabricatorFileSearchEngine.php',
|
||||||
'PhabricatorFileStorageBlob' => 'applications/files/storage/PhabricatorFileStorageBlob.php',
|
'PhabricatorFileStorageBlob' => 'applications/files/storage/PhabricatorFileStorageBlob.php',
|
||||||
'PhabricatorFileStorageConfigurationException' => 'applications/files/exception/PhabricatorFileStorageConfigurationException.php',
|
'PhabricatorFileStorageConfigurationException' => 'applications/files/exception/PhabricatorFileStorageConfigurationException.php',
|
||||||
@@ -1643,6 +1646,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorFlagEditController' => 'applications/flag/controller/PhabricatorFlagEditController.php',
|
'PhabricatorFlagEditController' => 'applications/flag/controller/PhabricatorFlagEditController.php',
|
||||||
'PhabricatorFlagListController' => 'applications/flag/controller/PhabricatorFlagListController.php',
|
'PhabricatorFlagListController' => 'applications/flag/controller/PhabricatorFlagListController.php',
|
||||||
'PhabricatorFlagQuery' => 'applications/flag/query/PhabricatorFlagQuery.php',
|
'PhabricatorFlagQuery' => 'applications/flag/query/PhabricatorFlagQuery.php',
|
||||||
|
'PhabricatorFlagSchemaSpec' => 'applications/flag/storage/PhabricatorFlagSchemaSpec.php',
|
||||||
'PhabricatorFlagSearchEngine' => 'applications/flag/query/PhabricatorFlagSearchEngine.php',
|
'PhabricatorFlagSearchEngine' => 'applications/flag/query/PhabricatorFlagSearchEngine.php',
|
||||||
'PhabricatorFlagSelectControl' => 'applications/flag/view/PhabricatorFlagSelectControl.php',
|
'PhabricatorFlagSelectControl' => 'applications/flag/view/PhabricatorFlagSelectControl.php',
|
||||||
'PhabricatorFlaggableInterface' => 'applications/flag/interface/PhabricatorFlaggableInterface.php',
|
'PhabricatorFlaggableInterface' => 'applications/flag/interface/PhabricatorFlaggableInterface.php',
|
||||||
@@ -3516,6 +3520,7 @@ phutil_register_library_map(array(
|
|||||||
'FundInitiativeTransaction' => 'PhabricatorApplicationTransaction',
|
'FundInitiativeTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
'FundInitiativeTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
'FundInitiativeTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
'FundInitiativeViewController' => 'FundController',
|
'FundInitiativeViewController' => 'FundController',
|
||||||
|
'FundSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'HarbormasterBuild' => array(
|
'HarbormasterBuild' => array(
|
||||||
'HarbormasterDAO',
|
'HarbormasterDAO',
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
@@ -3731,6 +3736,7 @@ phutil_register_library_map(array(
|
|||||||
'LegalpadDocumentSignatureViewController' => 'LegalpadController',
|
'LegalpadDocumentSignatureViewController' => 'LegalpadController',
|
||||||
'LegalpadMockMailReceiver' => 'PhabricatorObjectMailReceiver',
|
'LegalpadMockMailReceiver' => 'PhabricatorObjectMailReceiver',
|
||||||
'LegalpadReplyHandler' => 'PhabricatorMailReplyHandler',
|
'LegalpadReplyHandler' => 'PhabricatorMailReplyHandler',
|
||||||
|
'LegalpadSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'LegalpadTransaction' => 'PhabricatorApplicationTransaction',
|
'LegalpadTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
'LegalpadTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
'LegalpadTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
||||||
'LegalpadTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
'LegalpadTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
@@ -4541,6 +4547,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorFileLinkView' => 'AphrontView',
|
'PhabricatorFileLinkView' => 'AphrontView',
|
||||||
'PhabricatorFileListController' => 'PhabricatorFileController',
|
'PhabricatorFileListController' => 'PhabricatorFileController',
|
||||||
'PhabricatorFileQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorFileQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
|
'PhabricatorFileSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorFileSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'PhabricatorFileSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'PhabricatorFileStorageBlob' => 'PhabricatorFileDAO',
|
'PhabricatorFileStorageBlob' => 'PhabricatorFileDAO',
|
||||||
'PhabricatorFileStorageConfigurationException' => 'Exception',
|
'PhabricatorFileStorageConfigurationException' => 'Exception',
|
||||||
@@ -4573,6 +4580,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorFlagEditController' => 'PhabricatorFlagController',
|
'PhabricatorFlagEditController' => 'PhabricatorFlagController',
|
||||||
'PhabricatorFlagListController' => 'PhabricatorFlagController',
|
'PhabricatorFlagListController' => 'PhabricatorFlagController',
|
||||||
'PhabricatorFlagQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorFlagQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
|
'PhabricatorFlagSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorFlagSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'PhabricatorFlagSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'PhabricatorFlagSelectControl' => 'AphrontFormControl',
|
'PhabricatorFlagSelectControl' => 'AphrontFormControl',
|
||||||
'PhabricatorFlaggableInterface' => 'PhabricatorPHIDInterface',
|
'PhabricatorFlaggableInterface' => 'PhabricatorPHIDInterface',
|
||||||
|
|||||||
@@ -65,6 +65,26 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
|||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'metadata' => self::SERIALIZATION_JSON,
|
'metadata' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'name' => 'text255?',
|
||||||
|
'mimeType' => 'text255?',
|
||||||
|
'byteSize' => 'uint64?',
|
||||||
|
'storageEngine' => 'text32',
|
||||||
|
'storageFormat' => 'text32',
|
||||||
|
'storageHandle' => 'text255',
|
||||||
|
'authorPHID' => 'phid?',
|
||||||
|
'secretKey' => 'bytes20?',
|
||||||
|
'contentHash' => 'bytes40?',
|
||||||
|
'ttl' => 'epoch?',
|
||||||
|
'isExplicitUpload' => 'bool?',
|
||||||
|
'mailKey' => 'bytes20',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_phid' => null,
|
||||||
|
'phid' => array(
|
||||||
|
'columns' => array('phid'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
20
src/applications/files/storage/PhabricatorFileSchemaSpec.php
Normal file
20
src/applications/files/storage/PhabricatorFileSchemaSpec.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorFileSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorFileDAO');
|
||||||
|
|
||||||
|
$this->buildEdgeSchemata(new PhabricatorFile());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new PhabricatorFileTransaction(),
|
||||||
|
new PhabricatorFileTransactionComment());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new PhabricatorMacroTransaction(),
|
||||||
|
new PhabricatorMacroTransactionComment());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,4 +12,14 @@ final class PhabricatorFileTransactionComment
|
|||||||
return ($this->getTransactionPHID() != null);
|
return ($this->getTransactionPHID() != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
$config = parent::getConfiguration();
|
||||||
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
||||||
|
'key_draft' => array(
|
||||||
|
'columns' => array('authorPHID', 'transactionPHID'),
|
||||||
|
),
|
||||||
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,4 +6,17 @@ final class PhabricatorTransformedFile extends PhabricatorFileDAO {
|
|||||||
protected $transform;
|
protected $transform;
|
||||||
protected $transformedPHID;
|
protected $transformedPHID;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'transform' => 'text255',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'originalPHID' => array(
|
||||||
|
'columns' => array('originalPHID', 'transform'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,21 @@ final class PhabricatorFlag extends PhabricatorFlagDAO
|
|||||||
private $handle = self::ATTACHABLE;
|
private $handle = self::ATTACHABLE;
|
||||||
private $object = self::ATTACHABLE;
|
private $object = self::ATTACHABLE;
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
return array(
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'type' => 'text4',
|
||||||
|
'color' => 'uint32',
|
||||||
|
'note' => 'text',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'ownerPHID' => array(
|
||||||
|
'columns' => array('ownerPHID', 'type', 'objectPHID'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) + parent::getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
public function getObject() {
|
public function getObject() {
|
||||||
return $this->assertAttached($this->object);
|
return $this->assertAttached($this->object);
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/applications/flag/storage/PhabricatorFlagSchemaSpec.php
Normal file
10
src/applications/flag/storage/PhabricatorFlagSchemaSpec.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorFlagSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('PhabricatorFlagDAO');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -28,6 +28,10 @@ final class FundBacker extends FundDAO
|
|||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'properties' => self::SERIALIZATION_JSON,
|
'properties' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'status' => 'text32',
|
||||||
|
'amountInCents' => 'uint32',
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ final class FundInitiative extends FundDAO
|
|||||||
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',
|
||||||
|
'description' => 'text',
|
||||||
|
'status' => 'text32',
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
17
src/applications/fund/storage/FundSchemaSpec.php
Normal file
17
src/applications/fund/storage/FundSchemaSpec.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class FundSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('FundDAO');
|
||||||
|
$this->buildEdgeSchemata(new FundInitiative());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new FundInitiativeTransaction());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new FundBackerTransaction());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -54,6 +54,14 @@ final class LegalpadDocument extends LegalpadDAO
|
|||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'recentContributorPHIDs' => self::SERIALIZATION_JSON,
|
'recentContributorPHIDs' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'title' => 'text255',
|
||||||
|
'contributorCount' => 'uint32',
|
||||||
|
'versions' => 'uint32',
|
||||||
|
'mailKey' => 'bytes20',
|
||||||
|
'signatureType' => 'text4',
|
||||||
|
'preamble' => 'text',
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,16 @@ final class LegalpadDocumentBody extends LegalpadDAO
|
|||||||
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(
|
||||||
|
'version' => 'uint32',
|
||||||
|
'title' => 'text255',
|
||||||
|
'text' => 'text?',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'key_document' => array(
|
||||||
|
'columns' => array('documentPHID', 'version'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,17 @@ final class LegalpadDocumentSignature
|
|||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'signatureData' => self::SERIALIZATION_JSON,
|
'signatureData' => self::SERIALIZATION_JSON,
|
||||||
),
|
),
|
||||||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
|
'documentVersion' => 'uint32',
|
||||||
|
'signatureType' => 'text4',
|
||||||
|
'signerPHID' => 'phid?',
|
||||||
|
'signerName' => 'text255',
|
||||||
|
'signerEmail' => 'text255',
|
||||||
|
'secretKey' => 'bytes20',
|
||||||
|
'verified' => 'bool?',
|
||||||
|
'isExemption' => 'bool',
|
||||||
|
'exemptionPHID' => 'phid?',
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
15
src/applications/legalpad/storage/LegalpadSchemaSpec.php
Normal file
15
src/applications/legalpad/storage/LegalpadSchemaSpec.php
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class LegalpadSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildLiskSchemata('LegalpadDAO');
|
||||||
|
$this->buildEdgeSchemata(new LegalpadDocument());
|
||||||
|
|
||||||
|
$this->buildTransactionSchema(
|
||||||
|
new LegalpadTransaction(),
|
||||||
|
new LegalpadTransactionComment());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -19,4 +19,22 @@ final class LegalpadTransactionComment
|
|||||||
return ($this->getTransactionPHID() != null);
|
return ($this->getTransactionPHID() != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getConfiguration() {
|
||||||
|
$config = parent::getConfiguration();
|
||||||
|
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
||||||
|
'documentID' => 'id?',
|
||||||
|
'lineNumber' => 'uint32',
|
||||||
|
'lineLength' => 'uint32',
|
||||||
|
'fixedState' => 'text12?',
|
||||||
|
'hasReplies' => 'bool',
|
||||||
|
'replyToCommentPHID' => 'phid?',
|
||||||
|
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
||||||
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
||||||
|
'key_draft' => array(
|
||||||
|
'columns' => array('authorPHID', 'documentID', 'transactionPHID'),
|
||||||
|
),
|
||||||
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,19 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO
|
|||||||
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',
|
||||||
|
'authorPHID' => 'phid?',
|
||||||
|
'isDisabled' => 'bool',
|
||||||
|
'audioPHID' => 'phid?',
|
||||||
|
'audioBehavior' => 'text64',
|
||||||
|
'mailKey' => 'bytes20',
|
||||||
|
),
|
||||||
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
|
'name' => array(
|
||||||
|
'columns' => array('name'),
|
||||||
|
),
|
||||||
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1737,6 +1737,8 @@ abstract class LiskDAO {
|
|||||||
self::SERIALIZATION_PHP => 'bytes',
|
self::SERIALIZATION_PHP => 'bytes',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$binary_map = $this->getBinaryColumns();
|
||||||
|
|
||||||
$builtin = array(
|
$builtin = array(
|
||||||
'id' => 'id',
|
'id' => 'id',
|
||||||
'phid' => 'phid',
|
'phid' => 'phid',
|
||||||
@@ -1772,6 +1774,11 @@ abstract class LiskDAO {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($binary_map[$property])) {
|
||||||
|
$map[$property] = 'bytes';
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// If the column is named `somethingPHID`, infer it is a PHID.
|
// If the column is named `somethingPHID`, infer it is a PHID.
|
||||||
if (preg_match('/[a-z]PHID$/', $property)) {
|
if (preg_match('/[a-z]PHID$/', $property)) {
|
||||||
$map[$property] = 'phid';
|
$map[$property] = 'phid';
|
||||||
|
|||||||
Reference in New Issue
Block a user