Passed
Branch master (182172)
by Matthew
04:03 queued 01:23
created

CreateRoundTimes   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class CreateRoundTimes extends AbstractMigration
6
{
7
    public function change()
8
    {
9
        $round_times = $this->table('round_times', ['id' => 'round_time_id']);
10
        
11
        $round_times->addColumn('draft_id', 'integer', ['limit' => 11])
12
                ->addColumn('is_static_time', 'boolean', ['limit' => 1, 'null' => true, 'default' => null])
13
                ->addColumn('draft_round', 'integer', ['limit' => 2, 'null' => true, 'default' => null])
14
                ->addColumn('round_time_seconds', 'integer', ['limit' => 11, 'null' => true, 'default' => null])
15
                ->addIndex('draft_id', ['name' => 'draft_idx'])
16
                ->addIndex('draft_round', ['name' => 'round_idx'])
17
                ->create();
18
    }
19
}
20