Elgg  Version 3.0
20190125082345_entities_add_type_subtype_index.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class EntitiesAddTypeSubtypeIndex extends AbstractMigration {
27  public function change() {
28  $table = $this->table('entities');
29  if ($table->hasIndex('type_subtype')) {
30  return;
31  }
32 
33  $table->addIndex(['type', 'subtype'], [
34  'name' => "type_subtype",
35  'unique' => false,
36  'limit' => 50,
37  ]);
38 
39  $table->update();
40  }
41 }
$table
Definition: cron.php:57