Completed
Push — master ( fb8886...624979 )
by Matthew
9s
created

CreateRoundTimes::change()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class CreateRoundTimes extends AbstractMigration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
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