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

CreateDraftStats   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 33
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class CreateDraftStats extends AbstractMigration
6
{
7
    public function change()
8
    {
9
        $draft_stats = $this->table('draft_stats', ['id' => 'draft_stat_id']);
10
        
11
        $draft_stats->addColumn('draft_id', 'integer', ['limit' => 11])
12
                ->addColumn('drafting_time_seconds', 'integer', ['limit' => 11])
13
                ->addColumn('longest_avg_pick_manager_name', 'text')
14
                ->addColumn('longest_avg_pick_seconds', 'integer', ['limit' => 11])
15
                ->addColumn('shortest_avg_pick_manager_name', 'text')
16
                ->addColumn('shortest_avg_pick_seconds', 'integer', ['limit' => 11])
17
                ->addColumn('longest_single_pick_manager_name', 'text')
18
                ->addColumn('longest_single_pick_seconds', 'integer', ['limit' => 11])
19
                ->addColumn('shortest_single_pick_manager_name', 'text')
20
                ->addColumn('shortest_single_pick_seconds', 'integer', ['limit' => 11])
21
                ->addColumn('average_pick_seconds', 'integer', ['limit' => 11])
22
                ->addColumn('longest_round', 'integer', ['limit' => 11])
23
                ->addColumn('longest_round_seconds', 'integer', ['limit' => 11])
24
                ->addColumn('shortest_round', 'integer', ['limit' => 11])
25
                ->addColumn('shortest_round_seconds', 'integer', ['limit' => 11])
26
                ->addColumn('average_round_seconds', 'integer', ['limit' => 11])
27
                ->addColumn('most_drafted_team', 'text')
28
                ->addColumn('most_drafted_team_count', 'integer', ['limit' => 11])
29
                ->addColumn('least_drafted_team', 'text')
30
                ->addColumn('least_drafted_team_count', 'integer', ['limit' => 11])
31
                ->addColumn('most_drafted_position', 'text')
32
                ->addColumn('most_drafted_position_count', 'integer', ['limit' => 11])
33
                ->addColumn('least_drafted_position', 'text')
34
                ->addColumn('least_drafted_position_count', 'integer', ['limit' => 11])
35
                ->create();
36
    }
37
}
38