GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 141fea...1db939 )
by Steve
06:42 queued 11s
created

m150626_000004_create_audit_trail::up()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 22

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
nc 2
nop 0
dl 0
loc 22
rs 9.568
c 0
b 0
f 0
1
<?php
2
3
namespace bedezign\yii2\audit\migrations;
4
5
use bedezign\yii2\audit\components\Migration;
6
use yii\db\Schema;
7
8
class m150626_000004_create_audit_trail extends Migration
9
{
10
    const TABLE = '{{%audit_trail}}';
11
12
    public function up()
13
    {
14
        $this->createTable(self::TABLE, [
15
            'id'        => Schema::TYPE_PK,
16
            'entry_id'  => Schema::TYPE_INTEGER,
17
            'user_id'   => Schema::TYPE_INTEGER . ' NULL',
18
            'action'    => Schema::TYPE_STRING . ' NOT NULL',
19
            'model'     => Schema::TYPE_STRING . ' NOT NULL',
20
            'model_id'  => Schema::TYPE_STRING . ' NOT NULL',
21
            'field'     => Schema::TYPE_STRING,
22
            'old_value' => Schema::TYPE_TEXT,
23
            'new_value' => Schema::TYPE_TEXT,
24
            'created'   => Schema::TYPE_DATETIME . ' NOT NULL',
25
        ], ($this->db->driverName === 'mysql' ? 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB' : null));
26
27
        if ($this->db->driverName != 'sqlite') {
28
            $this->addForeignKey('fk_audit_trail_entry_id', self::TABLE, ['entry_id'], '{{%audit_entry}}', 'id');
29
        }
30
        $this->createIndex('idx_audit_user_id', self::TABLE, 'user_id');
31
        $this->createIndex('idx_audit_trail_field', self::TABLE, ['model', 'model_id', 'field']);
32
        $this->createIndex('idx_audit_trail_action', self::TABLE, 'action');
33
    }
34
35
    public function down()
36
    {
37
        if ($this->db->driverName != 'sqlite') {
38
            $this->dropForeignKey('fk_audit_trail_entry_id', self::TABLE);
39
        }
40
        $this->dropTable(self::TABLE);
41
    }
42
}
43