Conditions | 2 |
Paths | 1 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | const TABLE = '{{%audit_entry}}'; |
||
11 | |||
12 | public function up() |
||
13 | { |
||
14 | $this->createTable(self::TABLE, [ |
||
15 | 'id' => Schema::TYPE_PK, |
||
16 | 'created' => Schema::TYPE_DATETIME . ' NOT NULL', |
||
17 | 'user_id' => Schema::TYPE_INTEGER . ' DEFAULT 0', |
||
18 | 'duration' => Schema::TYPE_FLOAT . ' NULL', |
||
19 | 'ip' => Schema::TYPE_STRING . '(45) NULL', |
||
20 | 'request_method' => Schema::TYPE_STRING . '(16) NULL', |
||
21 | 'ajax' => Schema::TYPE_INTEGER . '(1) DEFAULT 0 NOT NULL', |
||
22 | 'route' => Schema::TYPE_STRING . '(255) NULL', |
||
23 | 'memory_max' => Schema::TYPE_INTEGER . ' NULL', |
||
24 | ], ($this->db->driverName === 'mysql' ? 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB' : null)); |
||
25 | |||
26 | $this->createIndex('idx_user_id', self::TABLE, ['user_id']); |
||
27 | $this->createIndex('idx_route', self::TABLE, ['route']); |
||
35 |