m161130_163000_package   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 20
ccs 0
cts 13
cp 0
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
 * Asset Packagist.
4
 *
5
 * @link      https://github.com/hiqdev/asset-packagist
6
 * @package   asset-packagist
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\assetpackagist\migrations;
12
13
use yii\db\Migration;
14
15
/**
16
 * Migration for queue message storage.
17
 *
18
 * @author Dmytro Naumenko <[email protected]>
19
 */
20
class m161130_163000_package extends Migration
21
{
22
    public $tableName = '{{%package}}';
23
    public $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
24
25
    public function up()
26
    {
27
        $this->createTable($this->tableName, [
28
            'type' => $this->string()->notNull(),
29
            'name' => $this->string()->notNull(),
30
            'last_update' => $this->integer(),
31
            'PRIMARY KEY (type, name)',
32
        ], $this->tableOptions);
33
    }
34
35
    public function down()
36
    {
37
        $this->dropTable($this->tableName);
38
    }
39
}
40