Elgg  Version master
20171021111132_align_subtype_columns.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class AlignSubtypeColumns extends AbstractMigration {
27  public function change() {
28 
29  $options = [
30  'null' => false,
31  'limit' => 252,
32  'encoding' => "utf8",
33  'collation' => "utf8_general_ci",
34  ];
35 
36  $table = $this->table('river');
37  $table->changeColumn('subtype', 'string', $options)->save();
38 
39  $table = $this->table('entities');
40  $table->changeColumn('subtype', 'string', $options)->save();
41 
42  $table = $this->table('system_log');
43 
44  $table->removeIndexByName('river_key')->save();
45 
46  $table->changeColumn('object_subtype', 'string', $options)->save();
47 
48  $table->addIndex([
49  'object_type',
50  'object_subtype',
51  'event'
52  ], [
53  'name' => "river_key",
54  'unique' => false,
55  'limit' => 25,
56  ]);
57 
58  $table->save();
59  }
60 }
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
Definition: language.php:20
$table
Definition: user.php:37