Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / repository / storage / PhabricatorRepositorySchemaSpec.php
blob8f93e31c290726e2c36a4449bfd4e1bc7991ef77
1 <?php
3 final class PhabricatorRepositorySchemaSpec
4 extends PhabricatorConfigSchemaSpec {
6 public function buildSchemata() {
7 $this->buildEdgeSchemata(new PhabricatorRepository());
9 $this->buildRawSchema(
10 id(new PhabricatorRepository())->getApplicationName(),
11 PhabricatorRepository::TABLE_COVERAGE,
12 array(
13 'id' => 'auto',
14 'branchID' => 'id',
15 'commitID' => 'id',
16 'pathID' => 'id',
17 'coverage' => 'bytes',
19 array(
20 'PRIMARY' => array(
21 'columns' => array('id'),
22 'unique' => true,
24 'key_path' => array(
25 'columns' => array('branchID', 'pathID', 'commitID'),
26 'unique' => true,
28 ));
30 $this->buildRawSchema(
31 id(new PhabricatorRepository())->getApplicationName(),
32 PhabricatorRepository::TABLE_FILESYSTEM,
33 array(
34 'repositoryID' => 'id',
35 'parentID' => 'id',
36 'svnCommit' => 'uint32',
37 'pathID' => 'id',
38 'existed' => 'bool',
39 'fileType' => 'uint32',
41 array(
42 'PRIMARY' => array(
43 'columns' => array('repositoryID', 'parentID', 'pathID', 'svnCommit'),
44 'unique' => true,
46 'repositoryID' => array(
47 'columns' => array('repositoryID', 'svnCommit'),
49 ));
51 $this->buildRawSchema(
52 id(new PhabricatorRepository())->getApplicationName(),
53 PhabricatorRepository::TABLE_LINTMESSAGE,
54 array(
55 'id' => 'auto',
56 'branchID' => 'id',
57 'path' => 'text',
58 'line' => 'uint32',
59 'authorPHID' => 'phid?',
60 'code' => 'text32',
61 'severity' => 'text16',
62 'name' => 'text255',
63 'description' => 'text',
65 array(
66 'PRIMARY' => array(
67 'columns' => array('id'),
68 'unique' => true,
70 'branchID' => array(
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'),
79 ));
81 $this->buildRawSchema(
82 id(new PhabricatorRepository())->getApplicationName(),
83 PhabricatorRepository::TABLE_PARENTS,
84 array(
85 'id' => 'auto',
86 'childCommitID' => 'id',
87 'parentCommitID' => 'id',
89 array(
90 'PRIMARY' => array(
91 'columns' => array('id'),
92 'unique' => true,
94 'key_child' => array(
95 'columns' => array('childCommitID', 'parentCommitID'),
96 'unique' => true,
98 'key_parent' => array(
99 'columns' => array('parentCommitID'),
103 $this->buildRawSchema(
104 id(new PhabricatorRepository())->getApplicationName(),
105 PhabricatorRepository::TABLE_PATH,
106 array(
107 'id' => 'auto',
108 'path' => 'text',
109 'pathHash' => 'bytes32',
111 array(
112 'PRIMARY' => array(
113 'columns' => array('id'),
114 'unique' => true,
116 'pathHash' => array(
117 'columns' => array('pathHash'),
118 'unique' => true,
122 $this->buildRawSchema(
123 id(new PhabricatorRepository())->getApplicationName(),
124 PhabricatorRepository::TABLE_PATHCHANGE,
125 array(
126 'repositoryID' => 'id',
127 'pathID' => 'id',
128 'commitID' => 'id',
129 'targetPathID' => 'id?',
130 'targetCommitID' => 'id?',
131 'changeType' => 'uint32',
132 'fileType' => 'uint32',
133 'isDirect' => 'bool',
134 'commitSequence' => 'uint32',
136 array(
137 'PRIMARY' => array(
138 'columns' => array('commitID', 'pathID'),
139 'unique' => true,
141 'repositoryID' => array(
142 'columns' => array('repositoryID', 'pathID', 'commitSequence'),
146 $this->buildRawSchema(
147 id(new PhabricatorRepository())->getApplicationName(),
148 PhabricatorRepository::TABLE_SUMMARY,
149 array(
150 'repositoryID' => 'id',
151 'size' => 'uint32',
152 'lastCommitID' => 'id',
153 'epoch' => 'epoch?',
155 array(
156 'PRIMARY' => array(
157 'columns' => array('repositoryID'),
158 'unique' => true,
160 'key_epoch' => array(
161 'columns' => array('epoch'),