Elgg
Version 6.3
engine
schema
migrations
20190606111641_entities_add_type_subtype_container_and_owner_indexes.php
Go to the documentation of this file.
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class
EntitiesAddTypeSubtypeContainerAndOwnerIndexes
extends
AbstractMigration
6
{
28
public
function
change
() {
29
$table
= $this->table(
'entities'
);
30
31
if
(!
$table
->hasIndexByName(
'type_subtype_owner'
)) {
32
$table
->addIndex([
'type'
,
'subtype'
,
'owner_guid'
], [
33
'name'
=>
"type_subtype_owner"
,
34
'unique'
=>
false
,
35
'limit'
=> [
'subtype'
=> 50],
36
]);
37
}
38
39
if
(!
$table
->hasIndexByName(
'type_subtype_container'
)) {
40
$table
->addIndex([
'type'
,
'subtype'
,
'container_guid'
], [
41
'name'
=>
"type_subtype_container"
,
42
'unique'
=>
false
,
43
'limit'
=> [
'subtype'
=> 50],
44
]);
45
}
46
47
$table
->update();
48
}
49
}
EntitiesAddTypeSubtypeContainerAndOwnerIndexes
Definition:
20190606111641_entities_add_type_subtype_container_and_owner_indexes.php:6
EntitiesAddTypeSubtypeContainerAndOwnerIndexes\change
change()
Change Method.
Definition:
20190606111641_entities_add_type_subtype_container_and_owner_indexes.php:28
$table
$table
Definition:
database.php:52
Generated on Tue Jun 9 2026 00:00:22 for Elgg by
1.9.1