DeploymentUser   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 39
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A change() 0 12 1
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class DeploymentUser extends AbstractMigration
6
{
7
    /**
8
     * Change Method.
9
     *
10
     * Write your reversible migrations using this method.
11
     *
12
     * More information on writing migrations is available here:
13
     * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
14
     *
15
     * The following commands can be used in this method and Phinx will
16
     * automatically reverse them when rolling back:
17
     *
18
     *    createTable
19
     *    renameTable
20
     *    addColumn
21
     *    addCustomColumn
22
     *    renameColumn
23
     *    addIndex
24
     *    addForeignKey
25
     *
26
     * Any other destructive changes will result in an error when trying to
27
     * rollback the migration.
28
     *
29
     * Remember to call "create()" or "update()" and NOT "save()" when working
30
     * with the Table class.
31
     */
32
    public function change()
33
    {
34
        $table = $this->table('deployments');
35
        $table->addColumn(
36
                'deployment_source',
37
                'string',
38
                [
39
                    'length' => 1024,
40
                    'null'   => true,
41
                ]
42
            )
43
            ->update();
44
    }
45
}
46