mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-11 14:28:31 +01:00
Summary: Ref T1191. Now that the whole database is covered, we don't need to do as much work to build expected schemata. Doing them database-by-database was helpful in converting, but is just reudndant work now. Instead of requiring every application to build its Lisk objects, just build all Lisk objects. I removed `harbormaster.lisk_counter` because it is unused. It would be nice to autogenerate edge schemata, too, but that's a little trickier. Test Plan: Database setup issues are all green. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley, hach-que Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10620
37 lines
920 B
PHP
37 lines
920 B
PHP
<?php
|
|
|
|
final class PhabricatorCacheSchemaSpec extends PhabricatorConfigSchemaSpec {
|
|
|
|
public function buildSchemata() {
|
|
$this->buildRawSchema(
|
|
'cache',
|
|
id(new PhabricatorKeyValueDatabaseCache())->getTableName(),
|
|
array(
|
|
'id' => 'auto64',
|
|
'cacheKeyHash' => 'bytes12',
|
|
'cacheKey' => 'text128',
|
|
'cacheFormat' => 'text16',
|
|
'cacheData' => 'bytes',
|
|
'cacheCreated' => 'epoch',
|
|
'cacheExpires' => 'epoch?',
|
|
),
|
|
array(
|
|
'PRIMARY' => array(
|
|
'columns' => array('id'),
|
|
'unique' => true,
|
|
),
|
|
'key_cacheKeyHash' => array(
|
|
'columns' => array('cacheKeyHash'),
|
|
'unique' => true,
|
|
),
|
|
'key_cacheCreated' => array(
|
|
'columns' => array('cacheCreated'),
|
|
),
|
|
'key_ttl' => array(
|
|
'columns' => array('cacheExpires'),
|
|
),
|
|
));
|
|
|
|
}
|
|
|
|
}
|