Projects   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 17
c 0
b 0
f 0
dl 0
loc 26
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A change() 0 19 1
1
<?php
2
3
4
use Phinx\Migration\AbstractMigration;
5
6
class Projects extends AbstractMigration
7
{
8
    /**
9
     * Change Method
10
     *
11
     * @author Ronan Chilvers <[email protected]>
12
     */
13
    public function change()
14
    {
15
        $projects = $this->table('projects', [
16
            'id' => 'project_id',
17
        ]);
18
        $projects
19
            ->addColumn('project_name', 'string', ['length' => 256, 'null' => false])
20
            ->addColumn('project_token', 'string', ['length' => 64, 'null' => false])
21
            ->addColumn('project_key', 'string', ['length' => 1024, 'null' => false])
22
            ->addColumn('project_provider', 'string', ['length' => 15, 'null' => false])
23
            ->addColumn('project_repository', 'string', ['length' => 1024, 'null' => false])
24
            ->addColumn('project_branch', 'string', ['length' => 1024, 'null' => false])
25
            ->addColumn('project_last_number', 'integer', ['null' => true, 'default' => null])
26
            ->addColumn('project_last_deployment', 'datetime', ['null' => true, 'default' => null])
27
            ->addColumn('project_last_author', 'string', ['length' => 256, 'null' => true, 'default' => null])
28
            ->addColumn('project_last_sha', 'string', ['length' => 64, 'null' => true, 'default' => null])
29
            ->addColumn('project_last_status', 'string', ['length' => 20, 'null' => true, 'default' => null])
30
            ->addTimestamps('project_created', 'project_updated')
31
            ->create();
32
    }
33
}
34