AddReportIdIndexToIncidents::change()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 1
b 0
f 0
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class AddReportIdIndexToIncidents extends AbstractMigration
6
{
7
    /**
8
     * Change Method.
9
     *
10
     * More information on this method is available here:
11
     * http://docs.phinx.org/en/latest/migrations.html#the-change-method
12
     */
13
    public function change(): void
14
    {
15
        $table = $this->table('incidents');
16
        $table->addIndex(
17
            ['report_id']
18
        );
19
        $table->update();
20
    }
21
}
22