Migration::init()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace app\migrations;
4
5
class Migration extends \yii\db\Migration
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $tableOptions = null;
11
12
    public function init()
13
    {
14
        parent::init();
15
16
        if ($this->db->driverName === 'mysql') {
17
            $this->tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';
18
        }
19
    }
20
}
21