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

m160313_153427_session_refill   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 9 1
A down() 0 6 1
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