Elgg  Version master
20221110111653_add_river_last_action.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types=1);
3 
6 
7 final class AddRiverLastAction extends AbstractMigration {
11  public function change(): void {
12  $table = $this->table('river');
13  if ($table->hasColumn('last_action')) {
14  return;
15  }
16 
17  $table->addColumn('last_action', 'integer', [
18  'null' => false,
19  'limit' => MysqlAdapter::INT_REGULAR,
20  'precision' => 11,
21  ]);
22  $table->addIndex(['last_action'], [
23  'name' => 'last_action',
24  'unique' => false,
25  ]);
26 
27  $table->update();
28 
29  // copy posted into last_action
30  $prefix = $this->getAdapter()->getOption('table_prefix');
31 
32  $this->execute("UPDATE {$prefix}river SET last_action = posted");
33  }
34 }
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
Definition: LICENSE.txt:215
$table
Definition: user.php:37
change()
Adds the river last action column and fills it with the posted timestamp.