CreateUseroptions   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A change() 0 27 1
1
<?php
2
use Migrations\AbstractMigration;
3
4
class CreateUseroptions extends AbstractMigration
0 ignored issues
show
Deprecated Code introduced by
The class Migrations\AbstractMigration has been deprecated: 4.5.0 You should use Migrations\BaseMigration for new migrations. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

4
class CreateUseroptions extends /** @scrutinizer ignore-deprecated */ AbstractMigration
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('useroptions');
16
        $table->addColumn('user_id', 'integer', [
17
            'default' => null,
18
            'limit' => 11,
19
            'null' => false,
20
        ]);
21
		$table->addColumn('name', 'string', [
22
            'default' => null,
23
            'limit' => 255,
24
            'null' => false,
25
        ]);
26
        $table->addColumn('value', 'string', [
27
            'default' => null,
28
            'limit' => 255,
29
            'null' => false,
30
        ]);
31
        $table->addColumn('created', 'datetime', [
32
            'default' => null,
33
            'null' => false,
34
        ]);
35
        $table->addColumn('modified', 'datetime', [
36
            'default' => null,
37
            'null' => false,
38
        ]);
39
        $table->create();
40
    }
41
}
42