Completed
Push — master ( eb0e60...e48222 )
by Dmitry
02:26
created

m161130_163000_package   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 9 1
A down() 0 4 1
1
<?php
2
3
namespace hiqdev\assetpackagist\migrations;
4
5
use yii\db\Migration;
6
7
/**
8
 * Migration for queue message storage
9
 *
10
 * @author Dmytro Naumenko <[email protected]>
11
 */
12
class m161130_163000_package extends Migration
13
{
14
    public $tableName = '{{%package}}';
15
    public $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
16
17
    public function up()
18
    {
19
        $this->createTable($this->tableName, [
20
            'type' => $this->string()->notNull(),
21
            'name' => $this->string()->notNull(),
22
            'last_update' => $this->integer(),
23
            'PRIMARY KEY (type, name)'
24
        ], $this->tableOptions);
25
    }
26
27
    public function down()
28
    {
29
        $this->dropTable($this->tableName);
30
    }
31
}
32