Completed
Push — master ( 89be15...80fd60 )
by Igor
11:15
created

m141230_043250_create_file::safeDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
use app\migrations\Migration;
4
5
class m141230_043250_create_file extends Migration
6
{
7
    public function safeUp()
8
    {
9
        $this->createTable('{{%file}}', [
10
            'id' => $this->primaryKey(),
11
            'user_id' => $this->integer()->notNull()->defaultValue(0),
12
            'title' => $this->string()->notNull()->defaultValue(''),
13
            'name' => $this->string()->notNull()->defaultValue(''),
14
            'date_create' => $this->timestamp()->null(),
15
            'date_update' => $this->timestamp()->null(),
16
            'ip' => $this->bigInteger(20)->notNull()->defaultValue(0),
17
        ], $this->tableOptions);
18
    }
19
20
    public function safeDown()
21
    {
22
        $this->dropTable('{{%file}}');
23
    }
24
}
25