Migration   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 6 2
1
<?php
2
3
namespace hauntd\vote\migrations;
4
5
use Yii;
6
7
/**
8
 * @author Alexander Kononenko <[email protected]>
9
 * @package hauntd\vote\migrations
10
 * @property \hauntd\vote\Module $module
11
 */
12
class Migration extends \yii\db\Migration
13
{
14
    /**
15
     * @var string
16
     */
17
    protected $tableOptions;
18
19
    /**
20
     * @inheritdoc
21
     */
22
    public function init()
23
    {
24
        parent::init();
25
        $this->tableOptions = null;
26
        if (Yii::$app->db->driverName == 'mysql') {
27
            $this->tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
28
        }
29
    }
30
}
31