Generate expected schemata for Fact, Owners, Herald and Diviner
Summary: Ref T1191. Notable: - `HeraldApplyTranscript` is not actually a DAO and has no table (it is serialized into HeraldTranscript). Test Plan: Down to fewer than 300 issues. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10588
This commit is contained in:
@@ -2,9 +2,25 @@
|
||||
|
||||
final class PhabricatorFactAggregate extends PhabricatorFactDAO {
|
||||
|
||||
protected $id;
|
||||
protected $factType;
|
||||
protected $objectPHID;
|
||||
protected $valueX;
|
||||
|
||||
public function getConfiguration() {
|
||||
return array(
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'id' => null,
|
||||
'factType' => 'text32',
|
||||
'valueX' => 'uint64',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'PRIMARY' => null,
|
||||
'factType' => array(
|
||||
'columns' => array('factType', 'objectPHID'),
|
||||
'unique' => true,
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,22 @@
|
||||
|
||||
final class PhabricatorFactCursor extends PhabricatorFactDAO {
|
||||
|
||||
protected $id;
|
||||
protected $name;
|
||||
protected $position;
|
||||
|
||||
public function getConfiguration() {
|
||||
return array(
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'name' => 'text64',
|
||||
'position' => 'text64',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'name' => array(
|
||||
'columns' => array('name'),
|
||||
'unique' => true,
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
final class PhabricatorFactRaw extends PhabricatorFactDAO {
|
||||
|
||||
protected $id;
|
||||
protected $factType;
|
||||
protected $objectPHID;
|
||||
protected $objectA;
|
||||
@@ -13,4 +12,29 @@ final class PhabricatorFactRaw extends PhabricatorFactDAO {
|
||||
protected $valueY;
|
||||
protected $epoch;
|
||||
|
||||
public function getConfiguration() {
|
||||
return array(
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'id' => null,
|
||||
'factType' => 'text32',
|
||||
'objectA' => 'phid',
|
||||
'valueX' => 'sint64',
|
||||
'valueY' => 'sint64',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'PRIMARY' => null,
|
||||
'objectPHID' => array(
|
||||
'columns' => array('objectPHID'),
|
||||
),
|
||||
'factType' => array(
|
||||
'columns' => array('factType', 'epoch'),
|
||||
),
|
||||
'factType_2' => array(
|
||||
'columns' => array('factType', 'objectA'),
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorFactSchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||
|
||||
public function buildSchemata() {
|
||||
$this->buildLiskSchemata('PhabricatorFactDAO');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user