Passed
Branch master (44bfae)
by giu
03:41
created

CreateOptionsUsers::change()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 13

Duplication

Lines 18
Ratio 100 %

Importance

Changes 0
Metric Value
dl 18
loc 18
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 13
nc 1
nop 0
1
<?php
2
use Migrations\AbstractMigration;
3
4
class CreateOptionsUsers 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...
5
{
6
    /**
7
     * Change Method.
8
     *
9
     * More information on this method is available here:
10
     * http://docs.phinx.org/en/latest/migrations.html#the-change-method
11
     * @return void
12
     */
13
    public function change()
14
    {
15
        $table = $this->table('options_users');
16
        $table->addColumn('name', 'string', [
17
            'default' => null,
18
            'limit' => 255,
19
            'null' => false,
20
        ]);
21
        $table->addColumn('created', 'datetime', [
22
            'default' => null,
23
            'null' => false,
24
        ]);
25
        $table->addColumn('modified', 'datetime', [
26
            'default' => null,
27
            'null' => false,
28
        ]);
29
        $table->create();
30
    }
31
}
32