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

m190502_163142_create_positions_table   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A safeUp() 0 11 1
A safeDown() 0 4 1
1
<?php
2
3
use yii\db\Migration;
4
5
/**
6
 * Handles the creation of table `positions`.
7
 */
8
class m190502_163142_create_positions_table extends Migration
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function safeUp()
14
    {
15
        $this->createTable('positions',
16
            [
17
                'id' => $this->primaryKey(),
18
                'name' => $this->string(),
19
                'created_at' => $this->dateTime(),
20
                'updated_at' => $this->dateTime(),
21
            ]
22
        );
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function safeDown()
29
    {
30
        $this->dropTable('positions');
31
    }
32
}
33