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

CreateDepthChartPositions::change()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

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 8
nc 1
nop 0
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
use Phinx\Db\Adapter\MysqlAdapter;
5
6
class CreateDepthChartPositions 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...
7
{
8
    public function change()
9
    {
10
        $depth_chart_positions = $this->table('depth_chart_positions');
11
        //Id column automatically created by Phinx
12
        $depth_chart_positions->addColumn('draft_id', 'integer', ['limit' => 11, 'default' => 0])
13
                ->addColumn('position', 'string', ['limit' => 6])
14
                ->addColumn('slots', 'integer', ['limit' => 5])
15
                ->addColumn('display_order', 'integer', ['limit' => MysqlAdapter::INT_TINY, 'default' => 0, 'signed' => false])
16
                ->addIndex('draft_id', ['name' => 'draft_idx'])
17
                ->create();
18
19
    }
20
}
21