Elgg  Version master
20210225131119_increase_relationship_column_length.php
Go to the documentation of this file.
1 <?php
2 
5 
6 class IncreaseRelationshipColumnLength extends AbstractMigration {
7 
11  public function change() {
12  if (!$this->hasTable('entity_relationships')) {
13  return;
14  }
15 
16  $table = $this->table('entity_relationships');
17  if (!$table->hasColumn('relationship')) {
18  return;
19  }
20 
21  $table->changeColumn('relationship', 'string', [
22  'limit' => MysqlAdapter::TEXT_SMALL,
23  ]);
24  $table->update();
25  }
26 }
change()
Update the relationship column to a larger size.
$table
Definition: cron.php:60