m171016_201410_init_myabstract_closed   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A safeDown() 0 3 1
A safeUp() 0 7 1
1
<?php
2
3
use yii\db\Migration;
4
5
class m171016_201410_init_myabstract_closed extends Migration
6
{
7
    public function safeUp()
8
    {
9
        $this->createTable('{{closing}}', [
10
            'table_name'=>$this->string(128)->notNull()->comment('referred entity table name'),
11
            'last_closing_time'=>$this->dateTime(6)->notNull()->comment('Last closure time in that entity'),
12
        ]);
13
        $this->addPrimaryKey('pk_closing', '{{closing}}', 'table_name');
14
    }
15
16
    public function safeDown()
17
    {
18
        $this->dropTable('{{closing}}');
19
    }
20
21
}
22