Completed
Push — master ( 187bdb...4894ab )
by Tobias
13:33
created

m160313_153427_session_refill::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
use yii\db\Migration;
4
5
class m160313_153427_session_refill extends Migration
6
{
7
    public function up()
8
    {
9
        $this->execute(<<<SQL
10
INSERT INTO {{%session}} (id, expire, data)
11
SELECT id, expire, data FROM __tmp_session
12
SQL
13
        );
14
        $this->dropTable('__tmp_session');
15
    }
16
17
    public function down()
18
    {
19
        echo "m160313_153427_session_refill cannot be reverted.\n";
20
21
        return false;
22
    }
23
}
24