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

m161130_163000_package::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
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