m170828_075235_create_district_table   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 5 1
A down() 0 4 1
1
<?php
2
3
use yii\db\Migration;
4
5
/**
6
 * Handles the creation of table `district`.
7
 */
8
class m170828_075235_create_district_table extends Migration
9
{
10
    /**
11
     * @inheritdoc
12
     * @see https://github.com/eduosi/district/blob/master/district-standard.sql
13
     */
14
    public function up()
15
    {
16
        $this->execute(file_get_contents('https://raw.githubusercontent.com/eduosi/district/master/district-full.sql'));
17
        //$this->execute(file_get_contents('https://raw.githubusercontent.com/eduosi/district/master/district-standard.sql'));
18
    }
19
20
    /**
21
     * @inheritdoc
22
     */
23
    public function down()
24
    {
25
        $this->dropTable('district');
26
    }
27
}
28