Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79796465
PhabricatorConfigCoreSchemaSpec.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Aug 28, 07:07
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Aug 30, 07:07 (2 d)
Engine
blob
Format
Raw Data
Handle
20182892
Attached To
rPH Phabricator
PhabricatorConfigCoreSchemaSpec.php
View Options
<?php
/**
* Builds schemata definitions for core infrastructure.
*/
final
class
PhabricatorConfigCoreSchemaSpec
extends
PhabricatorConfigSchemaSpec
{
public
function
buildSchemata
()
{
// Build all Lisk table schemata.
$lisk_objects
=
id
(
new
PhutilClassMapQuery
())
->
setAncestorClass
(
'PhabricatorLiskDAO'
)
->
execute
();
$counters
=
array
();
foreach
(
$lisk_objects
as
$object
)
{
if
(
$object
->
getConfigOption
(
LiskDAO
::
CONFIG_NO_TABLE
))
{
continue
;
}
$this
->
buildLiskObjectSchema
(
$object
);
$ids_counter
=
LiskDAO
::
IDS_COUNTER
;
if
(
$object
->
getConfigOption
(
LiskDAO
::
CONFIG_IDS
)
==
$ids_counter
)
{
$counters
[
$object
->
getApplicationName
()]
=
true
;
}
}
foreach
(
$counters
as
$database
=>
$ignored
)
{
$this
->
buildRawSchema
(
$database
,
PhabricatorLiskDAO
::
COUNTER_TABLE_NAME
,
array
(
'counterName'
=>
'text32'
,
'counterValue'
=>
'id64'
,
),
array
(
'PRIMARY'
=>
array
(
'columns'
=>
array
(
'counterName'
),
'unique'
=>
true
,
),
));
}
$ferret_objects
=
id
(
new
PhutilClassMapQuery
())
->
setAncestorClass
(
'PhabricatorFerretInterface'
)
->
execute
();
foreach
(
$ferret_objects
as
$ferret_object
)
{
$engine
=
$ferret_object
->
newFerretEngine
();
$this
->
buildFerretIndexSchema
(
$engine
);
}
}
}
Event Timeline
Log In to Comment