m160901_104452_addDelimiterTypeToImport   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A initInverter() 0 9 1
1
<?php
2
namespace execut\import\migrations;
3
class m160901_104452_addDelimiterTypeToImport extends \execut\yii\migration\Migration
4
{
5
    // Use safeUp/safeDown to run migration code within a transaction
6
    public function initInverter(\execut\yii\migration\Inverter $i)
7
    {
8
        $i->table('import_settings_values')
9
            ->addColumn('number_delimiter', $this->string())
10
            ->alterColumnSetDefault('number_delimiter', '\'.\'')
11
            ->update([
12
                'number_delimiter' => '.',
13
            ])
14
            ->alterColumnSetNotNull('number_delimiter');
15
    }
16
}
17