Completed
Push — master ( 193986...cdf399 )
by Andrey
11:47
created

m190220_013101_create_qualities_table::safeDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 4
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
use yii\db\Migration;
4
5
/**
6
 * Handles the creation of table `qualities`.
7
 */
8 View Code Duplication
class m190220_013101_create_qualities_table extends Migration
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function safeUp()
14
    {
15
        $this->createTable('qualities',
16
            [
17
                'id' => $this->primaryKey(),
18
                'title' => $this->string()->notNull(),
19
                'description' => $this->string(1024)->notNull(),
20
                'icon' => $this->string(64)->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