Elgg  Version 6.0
20180109135052_drop_type_subtype_from_river_table.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class DropTypeSubtypeFromRiverTable extends AbstractMigration {
9  public function change() {
10 
11  if ($this->hasTable('river')) {
12  $table = $this->table('river');
13 
14  if ($table->hasColumn('type')) {
15  $table->removeColumn('type');
16  }
17 
18  if ($table->hasColumn('subtype')) {
19  $table->removeColumn('subtype');
20  }
21 
22  if ($table->hasColumn('access_id')) {
23  $table->removeColumn('access_id');
24  }
25 
26  $table->save();
27  }
28  }
29 }
change()
Drops type and subtype columns from the river table.
$table
Definition: user.php:37