[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorRepositorySchemaSpec 4 extends PhabricatorConfigSchemaSpec { 5 6 public function buildSchemata() { 7 $this->buildEdgeSchemata(new PhabricatorRepository()); 8 9 $this->buildRawSchema( 10 id(new PhabricatorRepository())->getApplicationName(), 11 PhabricatorRepository::TABLE_BADCOMMIT, 12 array( 13 'fullCommitName' => 'text64', 14 'description' => 'text', 15 ), 16 array( 17 'PRIMARY' => array( 18 'columns' => array('fullCommitName'), 19 'unique' => true, 20 ), 21 )); 22 23 $this->buildRawSchema( 24 id(new PhabricatorRepository())->getApplicationName(), 25 PhabricatorRepository::TABLE_COVERAGE, 26 array( 27 'id' => 'auto', 28 'branchID' => 'id', 29 'commitID' => 'id', 30 'pathID' => 'id', 31 'coverage' => 'bytes', 32 ), 33 array( 34 'PRIMARY' => array( 35 'columns' => array('id'), 36 'unique' => true, 37 ), 38 'key_path' => array( 39 'columns' => array('branchID', 'pathID', 'commitID'), 40 ), 41 )); 42 43 $this->buildRawSchema( 44 id(new PhabricatorRepository())->getApplicationName(), 45 PhabricatorRepository::TABLE_FILESYSTEM, 46 array( 47 'repositoryID' => 'id', 48 'parentID' => 'id', 49 'svnCommit' => 'uint32', 50 'pathID' => 'id', 51 'existed' => 'bool', 52 'fileType' => 'uint32', 53 ), 54 array( 55 'PRIMARY' => array( 56 'columns' => array('repositoryID', 'parentID', 'pathID', 'svnCommit'), 57 'unique' => true, 58 ), 59 'repositoryID' => array( 60 'columns' => array('repositoryID', 'svnCommit'), 61 ), 62 )); 63 64 $this->buildRawSchema( 65 id(new PhabricatorRepository())->getApplicationName(), 66 PhabricatorRepository::TABLE_LINTMESSAGE, 67 array( 68 'id' => 'auto', 69 'branchID' => 'id', 70 'path' => 'text', 71 'line' => 'uint32', 72 'authorPHID' => 'phid?', 73 'code' => 'text32', 74 'severity' => 'text16', 75 'name' => 'text255', 76 'description' => 'text', 77 ), 78 array( 79 'PRIMARY' => array( 80 'columns' => array('id'), 81 'unique' => true, 82 ), 83 'branchID' => array( 84 'columns' => array('branchID', 'path(64)'), 85 ), 86 'branchID_2' => array( 87 'columns' => array('branchID', 'code', 'path(64)'), 88 ), 89 'key_author' => array( 90 'columns' => array('authorPHID'), 91 ), 92 )); 93 94 $this->buildRawSchema( 95 id(new PhabricatorRepository())->getApplicationName(), 96 PhabricatorRepository::TABLE_PARENTS, 97 array( 98 'id' => 'auto', 99 'childCommitID' => 'id', 100 'parentCommitID' => 'id', 101 ), 102 array( 103 'PRIMARY' => array( 104 'columns' => array('id'), 105 'unique' => true, 106 ), 107 'key_child' => array( 108 'columns' => array('childCommitID', 'parentCommitID'), 109 'unique' => true, 110 ), 111 'key_parent' => array( 112 'columns' => array('parentCommitID'), 113 ), 114 )); 115 116 $this->buildRawSchema( 117 id(new PhabricatorRepository())->getApplicationName(), 118 PhabricatorRepository::TABLE_PATH, 119 array( 120 'id' => 'auto', 121 'path' => 'text', 122 'pathHash' => 'bytes32', 123 ), 124 array( 125 'PRIMARY' => array( 126 'columns' => array('id'), 127 'unique' => true, 128 ), 129 'pathHash' => array( 130 'columns' => array('pathHash'), 131 'unique' => true, 132 ), 133 )); 134 135 $this->buildRawSchema( 136 id(new PhabricatorRepository())->getApplicationName(), 137 PhabricatorRepository::TABLE_PATHCHANGE, 138 array( 139 'repositoryID' => 'id', 140 'pathID' => 'id', 141 'commitID' => 'id', 142 'targetPathID' => 'id?', 143 'targetCommitID' => 'id?', 144 'changeType' => 'uint32', 145 'fileType' => 'uint32', 146 'isDirect' => 'bool', 147 'commitSequence' => 'uint32', 148 ), 149 array( 150 'PRIMARY' => array( 151 'columns' => array('commitID', 'pathID'), 152 'unique' => true, 153 ), 154 'repositoryID' => array( 155 'columns' => array('repositoryID', 'pathID', 'commitSequence'), 156 ), 157 )); 158 159 $this->buildRawSchema( 160 id(new PhabricatorRepository())->getApplicationName(), 161 PhabricatorRepository::TABLE_SUMMARY, 162 array( 163 'repositoryID' => 'id', 164 'size' => 'uint32', 165 'lastCommitID' => 'id', 166 'epoch' => 'epoch?', 167 ), 168 array( 169 'PRIMARY' => array( 170 'columns' => array('repositoryID'), 171 'unique' => true, 172 ), 173 'key_epoch' => array( 174 'columns' => array('epoch'), 175 ), 176 )); 177 178 } 179 180 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |