1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Generate expected schemata for Releeph

Summary:
Ref T1191.

  - This drops two tables.
  - Both tables were migrated to transactions a very long time ago and no longer have readers or writers.

Test Plan: Saw ~150 fewer warnings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10576
This commit is contained in:
epriestley 2014-09-28 15:12:41 -07:00
parent b149cb7e99
commit 9be2bf2119
7 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1 @@
DROP TABLE {$NAMESPACE}_releeph.releeph_event;

View file

@ -0,0 +1 @@
DROP TABLE {$NAMESPACE}_releeph.releeph_requestevent;

View file

@ -2802,6 +2802,7 @@ phutil_register_library_map(array(
'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 @@ phutil_register_library_map(array(
'ReleephRequestViewController' => 'ReleephBranchController',
'ReleephRequestorFieldSpecification' => 'ReleephFieldSpecification',
'ReleephRevisionFieldSpecification' => 'ReleephFieldSpecification',
'ReleephSchemaSpec' => 'PhabricatorConfigSchemaSpec',
'ReleephSeverityFieldSpecification' => 'ReleephLevelFieldSpecification',
'ReleephSummaryFieldSpecification' => 'ReleephFieldSpecification',
'ReleephWorkCanPushConduitAPIMethod' => 'ReleephConduitAPIMethod',

View file

@ -29,6 +29,26 @@ final class ReleephBranch extends ReleephDAO
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();
}

View file

@ -29,6 +29,17 @@ final class ReleephProject extends ReleephDAO
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();
}

View file

@ -153,6 +153,31 @@ final class ReleephRequest extends ReleephDAO
'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();
}

View file

@ -0,0 +1,20 @@
<?php
final class ReleephSchemaSpec
extends PhabricatorConfigSchemaSpec {
public function buildSchemata() {
$this->buildLiskSchemata('ReleephDAO');
$this->buildTransactionSchema(
new ReleephProductTransaction());
$this->buildTransactionSchema(
new ReleephBranchTransaction());
$this->buildTransactionSchema(
new ReleephRequestTransaction(),
new ReleephRequestTransactionComment());
}
}