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:
epriestley
2014-10-01 07:53:12 -07:00
parent cfbcd69e9b
commit dc8b2ae6d2
20 changed files with 357 additions and 12 deletions

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -0,0 +1,9 @@
<?php
final class PhabricatorFactSchemaSpec extends PhabricatorConfigSchemaSpec {
public function buildSchemata() {
$this->buildLiskSchemata('PhabricatorFactDAO');
}
}