3 final class PhabricatorRepositorySchemaSpec
4 extends PhabricatorConfigSchemaSpec
{
6 public function buildSchemata() {
7 $this->buildEdgeSchemata(new PhabricatorRepository());
10 id(new PhabricatorRepository())->getApplicationName(),
11 PhabricatorRepository
::TABLE_COVERAGE
,
17 'coverage' => 'bytes',
21 'columns' => array('id'),
25 'columns' => array('branchID', 'pathID', 'commitID'),
30 $this->buildRawSchema(
31 id(new PhabricatorRepository())->getApplicationName(),
32 PhabricatorRepository
::TABLE_FILESYSTEM
,
34 'repositoryID' => 'id',
36 'svnCommit' => 'uint32',
39 'fileType' => 'uint32',
43 'columns' => array('repositoryID', 'parentID', 'pathID', 'svnCommit'),
46 'repositoryID' => array(
47 'columns' => array('repositoryID', 'svnCommit'),
51 $this->buildRawSchema(
52 id(new PhabricatorRepository())->getApplicationName(),
53 PhabricatorRepository
::TABLE_LINTMESSAGE
,
59 'authorPHID' => 'phid?',
61 'severity' => 'text16',
63 'description' => 'text',
67 'columns' => array('id'),
71 'columns' => array('branchID', 'path(64)'),
73 'branchID_2' => array(
74 'columns' => array('branchID', 'code', 'path(64)'),
76 'key_author' => array(
77 'columns' => array('authorPHID'),
81 $this->buildRawSchema(
82 id(new PhabricatorRepository())->getApplicationName(),
83 PhabricatorRepository
::TABLE_PARENTS
,
86 'childCommitID' => 'id',
87 'parentCommitID' => 'id',
91 'columns' => array('id'),
95 'columns' => array('childCommitID', 'parentCommitID'),
98 'key_parent' => array(
99 'columns' => array('parentCommitID'),
103 $this->buildRawSchema(
104 id(new PhabricatorRepository())->getApplicationName(),
105 PhabricatorRepository
::TABLE_PATH
,
109 'pathHash' => 'bytes32',
113 'columns' => array('id'),
117 'columns' => array('pathHash'),
122 $this->buildRawSchema(
123 id(new PhabricatorRepository())->getApplicationName(),
124 PhabricatorRepository
::TABLE_PATHCHANGE
,
126 'repositoryID' => 'id',
129 'targetPathID' => 'id?',
130 'targetCommitID' => 'id?',
131 'changeType' => 'uint32',
132 'fileType' => 'uint32',
133 'isDirect' => 'bool',
134 'commitSequence' => 'uint32',
138 'columns' => array('commitID', 'pathID'),
141 'repositoryID' => array(
142 'columns' => array('repositoryID', 'pathID', 'commitSequence'),
146 $this->buildRawSchema(
147 id(new PhabricatorRepository())->getApplicationName(),
148 PhabricatorRepository
::TABLE_SUMMARY
,
150 'repositoryID' => 'id',
152 'lastCommitID' => 'id',
157 'columns' => array('repositoryID'),
160 'key_epoch' => array(
161 'columns' => array('epoch'),