2014-09-18 17:25:34 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class DifferentialSchemaSpec extends PhabricatorConfigSchemaSpec {
|
|
|
|
|
|
|
|
public function buildSchemata() {
|
2014-09-29 00:12:58 +02:00
|
|
|
$this->buildEdgeSchemata(new DifferentialRevision());
|
|
|
|
|
|
|
|
$this->buildRawSchema(
|
|
|
|
id(new DifferentialRevision())->getApplicationName(),
|
|
|
|
DifferentialChangeset::TABLE_CACHE,
|
|
|
|
array(
|
|
|
|
'id' => 'id',
|
|
|
|
'cache' => 'bytes',
|
|
|
|
'dateCreated' => 'epoch',
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'PRIMARY' => array(
|
|
|
|
'columns' => array('id'),
|
|
|
|
'unique' => true,
|
|
|
|
),
|
|
|
|
'dateCreated' => array(
|
|
|
|
'columns' => array('dateCreated'),
|
|
|
|
),
|
2017-10-04 19:51:29 +02:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'persistence' => PhabricatorConfigTableSchema::PERSISTENCE_CACHE,
|
2014-09-29 00:12:58 +02:00
|
|
|
));
|
|
|
|
|
|
|
|
$this->buildRawSchema(
|
|
|
|
id(new DifferentialRevision())->getApplicationName(),
|
|
|
|
DifferentialRevision::TABLE_COMMIT,
|
|
|
|
array(
|
|
|
|
'revisionID' => 'id',
|
|
|
|
'commitPHID' => 'phid',
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'PRIMARY' => array(
|
|
|
|
'columns' => array('revisionID', 'commitPHID'),
|
|
|
|
'unique' => true,
|
|
|
|
),
|
|
|
|
'commitPHID' => array(
|
|
|
|
'columns' => array('commitPHID'),
|
|
|
|
'unique' => true,
|
|
|
|
),
|
|
|
|
));
|
|
|
|
|
|
|
|
$this->buildRawSchema(
|
|
|
|
id(new DifferentialRevision())->getApplicationName(),
|
|
|
|
ArcanistDifferentialRevisionHash::TABLE_NAME,
|
|
|
|
array(
|
|
|
|
'revisionID' => 'id',
|
|
|
|
'type' => 'bytes4',
|
|
|
|
'hash' => 'bytes40',
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'type' => array(
|
|
|
|
'columns' => array('type', 'hash'),
|
|
|
|
),
|
|
|
|
'revisionID' => array(
|
|
|
|
'columns' => array('revisionID'),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
|
|
|
|
|
2014-09-18 17:25:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|