Completed
Push — master ( bc825a...1aba9a )
by William
06:03
created

AddReportIdIndexToIncidents   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 18
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A change() 0 9 1
1
<?php
2
use Phinx\Migration\AbstractMigration;
3
4
class AddReportIdIndexToIncidents extends AbstractMigration
5
{
6
    /**
7
     * Change Method.
8
     *
9
     * More information on this method is available here:
10
     * http://docs.phinx.org/en/latest/migrations.html#the-change-method
11
     * @return void
12
     */
13
    public function change()
14
    {
15
        $table = $this->table('incidents');
16
        $table->addIndex(
17
            [
18
                'report_id',
19
            ]
20
        );
21
        $table->update();
22
    }
23
}
24