Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function up() |
||
13 | { |
||
14 | $this->createTable(self::TABLE, [ |
||
15 | 'id' => Schema::TYPE_PK, |
||
16 | 'entry_id' => Schema::TYPE_INTEGER . ' NOT NULL', |
||
17 | 'created' => Schema::TYPE_DATETIME . ' NOT NULL', |
||
18 | 'type' => Schema::TYPE_STRING . '(20) NOT NULL', |
||
19 | 'message' => Schema::TYPE_TEXT . ' NOT NULL', |
||
20 | 'origin' => Schema::TYPE_STRING . '(512)', |
||
21 | 'data' => Schema::TYPE_BINARY, |
||
22 | ], $this->db->driverName === 'mysql' ? 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB' : null); |
||
23 | |||
24 | if ($this->db->driverName != 'sqlite') { |
||
25 | $this->addForeignKey('fk_audit_javascript_entry_id', self::TABLE, ['entry_id'], '{{%audit_entry}}', 'id'); |
||
26 | } |
||
27 | } |
||
28 | |||
37 |