Elgg  Version 5.1
20181107091651_add_entities_subtype_index.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class AddEntitiesSubtypeIndex extends AbstractMigration
6 {
28  public function change() {
29  $table = $this->table('entities');
30  if ($table->hasIndexByName('subtype')) {
31  return;
32  }
33 
34  $table->addIndex(['subtype'], [
35  'name' => "subtype",
36  'unique' => false,
37  'limit' => 50,
38  ]);
39 
40  $table->save();
41  }
42 }
$table
Definition: user.php:37