Passed
Branch master (3c33c7)
by Andrey
04:31
created

m190220_013101_create_qualities_table::safeDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
nc 1
nop 0
dl 0
loc 3
c 1
b 0
f 0
cc 1
rs 10
1
<?php
2
3
use yii\db\Migration;
4
5
/**
6
 * Handles the creation of table `qualities`.
7
 */
8
class m190220_013101_create_qualities_table extends Migration
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function safeUp()
14
    {
15
        $this->createTable('qualities',
16
            [
17
                'id' => $this->primaryKey(),
18
                'title' => $this->string(128)->notNull(),
19
                'description' => $this->text()->notNull(),
20
                'icon' => $this->string(128)->notNull(),
21
                'created_at' => $this->dateTime(),
22
                'updated_at' => $this->dateTime(),
23
            ]
24
        );
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function safeDown()
31
    {
32
        $this->dropTable('qualities');
33
    }
34
}
35