diff --git a/resources/sql/autopatches/20140926.schema.01.droprelev.sql b/resources/sql/autopatches/20140926.schema.01.droprelev.sql new file mode 100644 --- /dev/null +++ b/resources/sql/autopatches/20140926.schema.01.droprelev.sql @@ -0,0 +1 @@ +DROP TABLE {$NAMESPACE}_releeph.releeph_event; diff --git a/resources/sql/autopatches/20140926.schema.02.droprelreqev.sql b/resources/sql/autopatches/20140926.schema.02.droprelreqev.sql new file mode 100644 --- /dev/null +++ b/resources/sql/autopatches/20140926.schema.02.droprelreqev.sql @@ -0,0 +1 @@ +DROP TABLE {$NAMESPACE}_releeph.releeph_requestevent; 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 @@ -2802,6 +2802,7 @@ 'ReleephRequestViewController' => 'applications/releeph/controller/request/ReleephRequestViewController.php', 'ReleephRequestorFieldSpecification' => 'applications/releeph/field/specification/ReleephRequestorFieldSpecification.php', 'ReleephRevisionFieldSpecification' => 'applications/releeph/field/specification/ReleephRevisionFieldSpecification.php', + 'ReleephSchemaSpec' => 'applications/releeph/storage/ReleephSchemaSpec.php', 'ReleephSeverityFieldSpecification' => 'applications/releeph/field/specification/ReleephSeverityFieldSpecification.php', 'ReleephSummaryFieldSpecification' => 'applications/releeph/field/specification/ReleephSummaryFieldSpecification.php', 'ReleephWorkCanPushConduitAPIMethod' => 'applications/releeph/conduit/work/ReleephWorkCanPushConduitAPIMethod.php', @@ -5894,6 +5895,7 @@ 'ReleephRequestViewController' => 'ReleephBranchController', 'ReleephRequestorFieldSpecification' => 'ReleephFieldSpecification', 'ReleephRevisionFieldSpecification' => 'ReleephFieldSpecification', + 'ReleephSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'ReleephSeverityFieldSpecification' => 'ReleephLevelFieldSpecification', 'ReleephSummaryFieldSpecification' => 'ReleephFieldSpecification', 'ReleephWorkCanPushConduitAPIMethod' => 'ReleephConduitAPIMethod', diff --git a/src/applications/releeph/storage/ReleephBranch.php b/src/applications/releeph/storage/ReleephBranch.php --- a/src/applications/releeph/storage/ReleephBranch.php +++ b/src/applications/releeph/storage/ReleephBranch.php @@ -29,6 +29,26 @@ self::CONFIG_SERIALIZATION => array( 'details' => self::SERIALIZATION_JSON, ), + self::CONFIG_COLUMN_SCHEMA => array( + 'basename' => 'text64', + 'isActive' => 'bool', + 'symbolicName' => 'text64?', + 'name' => 'text128', + ), + self::CONFIG_KEY_SCHEMA => array( + 'releephProjectID' => array( + 'columns' => array('releephProjectID', 'symbolicName'), + 'unique' => true, + ), + 'releephProjectID_2' => array( + 'columns' => array('releephProjectID', 'basename'), + 'unique' => true, + ), + 'releephProjectID_name' => array( + 'columns' => array('releephProjectID', 'name'), + 'unique' => true, + ), + ), ) + parent::getConfiguration(); } diff --git a/src/applications/releeph/storage/ReleephProject.php b/src/applications/releeph/storage/ReleephProject.php --- a/src/applications/releeph/storage/ReleephProject.php +++ b/src/applications/releeph/storage/ReleephProject.php @@ -29,6 +29,17 @@ self::CONFIG_SERIALIZATION => array( 'details' => self::SERIALIZATION_JSON, ), + self::CONFIG_COLUMN_SCHEMA => array( + 'name' => 'text255', + 'trunkBranch' => 'text255', + 'isActive' => 'bool', + ), + self::CONFIG_KEY_SCHEMA => array( + 'projectName' => array( + 'columns' => array('name'), + 'unique' => true, + ), + ), ) + parent::getConfiguration(); } diff --git a/src/applications/releeph/storage/ReleephRequest.php b/src/applications/releeph/storage/ReleephRequest.php --- a/src/applications/releeph/storage/ReleephRequest.php +++ b/src/applications/releeph/storage/ReleephRequest.php @@ -153,6 +153,31 @@ 'details' => self::SERIALIZATION_JSON, 'userIntents' => self::SERIALIZATION_JSON, ), + self::CONFIG_COLUMN_SCHEMA => array( + 'summary' => 'text', + 'requstCommitPHID' => 'phid?', + 'commitIdentifier' => 'text40', + 'pickStatus' => 'uint32', + 'inBranch' => 'bool', + 'mailKey' => 'bytes20', + ), + self::CONFIG_KEY_SCHEMA => array( + 'key_phid' => null, + 'phid' => array( + 'columns' => array('phid'), + 'unique' => true, + ), + 'requestIdentifierBranch' => array( + 'columns' => array('requestCommitPHID', 'branchID'), + 'unique' => true, + ), + 'branchID' => array( + 'columns' => array('branchID'), + ), + 'key_requestedObject' => array( + 'columns' => array('requestedObjectPHID'), + ), + ), ) + parent::getConfiguration(); } diff --git a/src/applications/releeph/storage/ReleephSchemaSpec.php b/src/applications/releeph/storage/ReleephSchemaSpec.php new file mode 100644 --- /dev/null +++ b/src/applications/releeph/storage/ReleephSchemaSpec.php @@ -0,0 +1,20 @@ +buildLiskSchemata('ReleephDAO'); + + $this->buildTransactionSchema( + new ReleephProductTransaction()); + + $this->buildTransactionSchema( + new ReleephBranchTransaction()); + + $this->buildTransactionSchema( + new ReleephRequestTransaction(), + new ReleephRequestTransactionComment()); + } + +}