Elgg
Version master
engine
schema
migrations
20200303122949_add_time_created_index_to_annotations_table.php
Go to the documentation of this file.
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class
AddTimeCreatedIndexToAnnotationsTable
extends
AbstractMigration {
6
10
public
function
change
() {
11
if
(!$this->hasTable(
'annotations'
)) {
12
return
;
13
}
14
15
$table
= $this->table(
'annotations'
);
16
if
(
$table
->hasIndexByName(
'time_created'
)) {
17
return
;
18
}
19
20
$table
->addIndex([
'time_created'
], [
21
'name'
=>
'time_created'
,
22
'unique'
=>
false
,
23
]);
24
25
$table
->save();
26
}
27
}
$table
$table
Definition:
user.php:37
AddTimeCreatedIndexToAnnotationsTable
Definition:
20200303122949_add_time_created_index_to_annotations_table.php:5
AddTimeCreatedIndexToAnnotationsTable\change
change()
Adds an index to the annotations table for the time_created column.
Definition:
20200303122949_add_time_created_index_to_annotations_table.php:10
Generated on Fri Aug 29 2025 00:01:58 for Elgg by
1.9.1